enter key acting like submit button - not wanting that

T

Tech Express

I do not a submit to happen until the submit button is click.
How can I stop the enter key from doing the submit?
 
S

Singapore Computer Service

Hello,

This is actually a accessibility feature to quickly submit a form. You can
add a onSubmit trigger to the FORM tag to be notified when the enter or
submit button is pressed.

If you want the Enter key to be ignored, just add onSubmit="return false;"
to the FORM tag:
<form action="ZXXXXX" onSubmit="return false;" >

Note that those who disable JavaScript will still be able to submit the
form, so you should validate in the server end if needed.
__
http://www.bootstrike.com/ComputerService/
Singapore Computer Home Remote On-Site Repair Service
http://www.bootstrike.com/VHSVideoConvert/
Video Conversion VHS Video8 Hi8 Digital8 MiniDv NTSC PAL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top