Validating text boxes in javascript

You can't get away without calling get Element By Id though.

The best way to handle validation in Javascript is with regular expressions.

Most often, the purpose of data validation is to ensure correct user input.

I want to validate the number that was entered by comparing it to an SQL table which contains a list of valid employee numbers.

I want to ensure that the employee number entered in the text box is also contained in the SQL table.

Check out examples here If you need to manipulate the date, i.e.

if you want to convert it through code then you need to split the string up using the Split function and then combine it in the correct order again.

Search for validating text boxes in javascript:

validating text boxes in javascript-21validating text boxes in javascript-83validating text boxes in javascript-70validating text boxes in javascript-40

You are currently viewing the BOOK: Beginning Java Script section of the Wrox Programmer to Programmer discussions.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “validating text boxes in javascript”