I have a form that has validation on the textfields.The validation methods run with the submit's onclick event...
But now I have noticed that if a user presses enter,the form will be submitted without any validation being performed...
What can I do about this??
This works fine when the user clicks submit BUT if the user presses enter:
-the validate function will run and return false but the data is already posted!!
Also we can rely on javascript alone because the system is used by call-centre operators in the company
ie.they all have javascript enabled in their browsers
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35446
9
posted
0
You need to write " onsubmit="return validate()" " in order for the return value to be used for stopping the form submission.