stop enter key from submitting a form

P

Phil

Anyone know how to stop , in html, the enter key
from submitting a form ? That is, in my online survey,
if I accidently press [enter], the software interpretes
it as equivalent to clicking on the "submit' button.
The solution has to work on Netscape or IE (veerions 5 or higher)
Any ideas are appreciated.
 
A

Andy Holmes

Phil said:
Anyone know how to stop , in html, the enter key
from submitting a form ? That is, in my online survey,
if I accidently press [enter], the software interpretes
it as equivalent to clicking on the "submit' button.
The solution has to work on Netscape or IE (veerions 5 or higher)
Any ideas are appreciated.

Well, you could try to catch the key press with javascript and have it
return false. That's a little vague I know, but just to give you a
general idea...

-Andy
 
R

rf

Phil said:
Anyone know how to stop , in html, the enter key
from submitting a form ? That is, in my online survey,
if I accidently press [enter], the software interpretes
it as equivalent to clicking on the "submit' button.
The solution has to work on Netscape or IE (veerions 5 or higher)
Any ideas are appreciated.

It appears this can't be done reliably.

http://allmyfaqs.com/faq.pl?HTML_Forms

Cheers
Richard.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top