Forum Moderators: open

Message Too Old, No Replies

Can I avoid auto submitting when press ENTER?

         

asdasddd

1:31 am on Mar 2, 2005 (gmt 0)

10+ Year Member



On the page, there is a simple form with serval textfields and a submit button. When I input some words in the textfield, the form will be auto submitted if I pressed the ENTER key. That is what I want to avoid. I want the user press on the submit button to submit the form, not by the ENTER key.

Is there any way to do with it? Thanks for your help! Have a great day!

kaled

1:40 am on Mar 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Create a button with onclick="document.forms[0].submit()"

You should also add a submit button in a <noscript> tag.

Kaled.

asdasddd

9:15 am on Mar 2, 2005 (gmt 0)

10+ Year Member



Yes, it works in IE, but it will not submit the form when browse the page in firefox.

Thank you any way!