2. Juni 2016 10:40
if (Xrm.Page.getAttribute("telephone1").getValue() == null)
{
alert("Bitte Ihre Telefonnummer eingeben!");
Xrm.Page.getControl("telephone1").setFocus();
return false;
}
else
{
for (var i = 0; i < 50; i++)
{
if ((Xrm.Page.getAttribute("telephone1").getValue.charAt(i) > "9" ||
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) < "0") &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "/" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != " " &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "-" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "+" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != ")" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "(" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "]" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "[" &&
Xrm.Page.getAttribute("telephone1").getValue.charAt(i) != "'")
{
alert("Bitte Ihre Telefonnummer eingeben!");
break;
}
}
}
2. Juni 2016 11:30
2. Juni 2016 14:12
2. Juni 2016 14:52