did u know that giving the validation of a form in the submit button will not work if the form has only one textfield?
try creating a form and a single textfield, write the script for the textfield validation and put it in the submit button.
give focus to the textfield and hit enter key
validation will not happen (atleast in IE)
Exception:
to be on the safe side do all form validations in the onsubmit event of the form.
<form ..... onsubmit="return validate();">
try creating a form and a single textfield, write the script for the textfield validation and put it in the submit button.
give focus to the textfield and hit enter key
validation will not happen (atleast in IE)
Exception:
to be on the safe side do all form validations in the onsubmit event of the form.
<form ..... onsubmit="return validate();">