Submit form

liunx

Guest
Hi,<br />
<br />
I have a form with a couple of text boxes. However i do not wish to submit the form when users click "Enter" in one of the textboxes. <br />
<br />
Is there a way to stop the form from submitting when a user clicks "Enter" in one of those textboxes? I want to submit the form ONLY when the user clicks on the "Submit" button.<br />
<br />
Please help!<!--content-->Yes i have a button type="submit". In fact i've tried it with a couple of forms. Everytime i click "enter" on a textbox, the form submits.<br />
<br />
how can i stop this?<!--content-->by "click enter" i think he means press enter on the keyboard. <br />
<br />
actually my boss just asked me about this. in internet explorer, if you press enter it's like pressing enter on the first button in the tab order. and changing the tab order through tabindex doesn't help. Any way to set it to submit which button or turn it off completely?<!--content-->this sums it up: <br />
<br />
<!-- m --><a class="postlink" href="http://www.cs.tut.fi/~jkorpela/forms/enter.html">http://www.cs.tut.fi/~jkorpela/forms/enter.html</a><!-- m --><!--content-->This isn't a fix, but what if you used a field that required validation? Maybe a checkbox at the bottom of the form that has to be checked before the script will allow the form to be submitted. Add some instructions on the error window to remind the user to complete all fields, or whatever, and use the Submit button to send.<br />
<br />
Hope that helps.<br />
<br />
Aronya1<!--content-->
 
Back
Top