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 MallisettiRank #2,740 · 511 reputationPosted Aug 11, 2010, 12:17 AM EDT
that is equal to space("") then also you return the false .
major mistake is
If it's ok plz click on accept thumb