by Shashi Dhar Kumar | Nov 6, 2007 | JavaScript
The form validation script needs to access the form in the HTML page to determine what values the user has filled in. So first we have to enter the form by means of the Level 0 DOM. The general syntax for accessing a form element is:...
by Shashi Dhar Kumar | Nov 6, 2007 | JavaScript
Of course, the most important thing is to find out what the user has filled in or checked in the form. At other times you might want to fill in something in the form. Below are snippets of...
by Shashi Dhar Kumar | Aug 6, 2007 | JavaScript
var emailfilter=/^w+[+.w-]*@([w-]+.)*w+[w-]*.([a-z]{2,4}|d+)$/i function checkmail(e){ var returnval=emailfilter.test(e.value) if (returnval==false){ alert(“Please enter a valid email address.”) e.select() } return returnval...