And the below JS function is assigned to Button as below:-
function ToCellValidate()
{
var mob = document.getElementById(<%=txtMobileNo.ClientID%>").value;
if(mob !="")
{
var incomingString = mob ;
if(trimSpace(incomingString).length > 15 || incomingString.search(/[^0-9\-()+]/g) != -1 )
{
alert('Please enter valid mobile number');
txtMobileNo.focus();
txtMobileNo.value="";
return false;
}
else
return true;
}
}
Please tell me what is wrong with above JS function.
Koteswararao MallisettiPosted Aug 11, 2010, 4:17 AM
that is equal to space("") then also you return the false .
major mistake is
If it's ok plz click on accept thumb