Subscribe to Subscribers
Talk to Webmaster Tony John


Forums » .NET » ASP.NET »

What is javascript code to validate comma separated numbers?No multiple comma,no prefix


Posted Date: 30 Nov 2009      Posted By:: Rasmi Ranjan     Member Level: Gold    Member Rank: 0     Points: 1   Responses: 1



Hi ,
I want to validate comma separated numbers in javascript.No multiple comma between numbers,No prefix comma and no postfix comma allowed.
How to validate?Can anyone seggest me...




Responses

#448794    Author: DeviPriyaa      Member Level: Gold      Member Rank: 808     Date: 01/Dec/2009   Rating: 2 out of 52 out of 5     Points: 2

function validate()
{

var Code=/^(([0-9a-zA-Z](,)?)*)+$/
if (document.getElementById("<%=Textbox1.ClientID%>").value.search(Code)==-1) //if match failed
{

alert("Please Check value")

}
}

With Regards,
D. DeviPriyaa

http://www.PaisaLive.com/register.asp?2000129-6271796
DeviPriyaa's Profile



 
Post Reply

 This thread is locked for new responses. Please post your comments and questions as a separate thread.
If required, refer to the URL of this page in your new post.



Next : Error in Export webform to PDF
Previous : How to use multi Forms in a single ASPX page?
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
2005 - 2012 All Rights Reserved.
.NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
Articles, tutorials and all other content offered here is for educational purpose only.
We are not associated with Microsoft or its partners.