Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > stop enter key from submitting a form

Reply
Thread Tools

stop enter key from submitting a form

 
 
Phil
Guest
Posts: n/a
 
      09-13-2003
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.
 
Reply With Quote
 
 
 
 
Andy Holmes
Guest
Posts: n/a
 
      09-13-2003
Phil wrote:
> 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

 
Reply With Quote
 
 
 
 
rf
Guest
Posts: n/a
 
      09-13-2003

"Phil" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) om...
> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Preventing the Enter key from submitting a form donpro Javascript 2 11-09-2007 07:33 PM
C# .NET stop carriage return/enter key submitting the form Veronica Bourke ASP .Net Web Controls 3 02-16-2005 06:06 PM
Enter Key H*ll, control enter key submit button BrianDH ASP .Net Web Controls 3 01-12-2005 08:29 PM
Submitting the form correctly using the enter key thechaosengine ASP .Net 2 01-10-2005 12:21 PM
Replace Tab Key to Return Key (Enter Key) from Web Forms? M P ASP General 1 08-06-2004 08:32 AM



Advertisments