Javascript code for validating textbox


javascript code for validating textbox-13

function form Validation() function userid_validation(uid,mx,my) function passid_validation(passid,mx,my) function all Letter(uname) function alphanumeric(uadd) function countryselect(ucountry) function allnumeric(uzip) function Validate Email(uemail) function validsex(umsex,ufsex) Flowchart: file_download Download the validation code from here.

You can view this Sample Java Script Registration From Validation Example in a separate browser window and check how the validation is working.

For the sake of demonstration, we have taken five countries only. CSS Code of the Sample Registration Form The code above checks whether a sex is selected. If Male or Female is selected, it generates an alert saying that the form is successfully submitted and it reloads the form.

Flowchart: Here is the entire Java Script used for validation of the form.

It sets the focus to the input field until the user supplies a valid value.