function checkisinteger()
{
var s=Xrm.Page.getAttribute('telephone1').getValue();
if(s!=null)
{
var i;
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) break;
}
if(i {
alert("Enter a valid phone number");
Xrm.Page.getAttribute('telephone1').setValue("");
}
}
}
{
var s=Xrm.Page.getAttribute('telephone1').getValue();
if(s!=null)
{
var i;
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (((c < "0") || (c > "9"))) break;
}
if(i
alert("Enter a valid phone number");
Xrm.Page.getAttribute('telephone1').setValue("");
}
}
}
No comments:
Post a Comment