TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ashok N
NA
8
10.6k
Validating mobileNo.
Aug 11 2010 1:52 AM
In asp.net appln, I have a TextBox for mobile num with ID "txtMobileNo".
And the below JS function is assigned to Button as below:-
<asp:Button ID="Button1" runat="server" Text="Button" OnClientClick="ToCellValidate()"/>
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.
Reply
Answers (
1
)
How to write the test scenario? Plz Explain by giving a Example.
Why software companies are hiring test engineer?They can do the testing with the developers also.Then why???