Hello, I'm new in using javascript ,I'm developing an asp web app and I want to validate some textboxes but I don't Know how I can access them from the java script code and how I can prevent the page from going to the server after pressing the submit button.
Thanks.
You can validate several different ways. One easy way is with the use of patterns. Also, if you are validating credit card numbers, there are preset alogarithms I believe. I cannot remember the method names exactly but search google for pattern comparing/matching in javascript or credit card number validation in javascript...
Hope this helps.
It would help if you indicated exactly what it is you want to validate. Name? email? credit card number? or what?
If you decided to use the search facility on this forum using 'validate textbox ' or 'validate form' as your search terms you would find many examples. e.g.
http://www.codingforums.com/showthread.php?t=101928