SitePoint Sponsor |
|
User Tag List
Results 1 to 3 of 3
-
Dec 23, 2003, 16:17 #1
- Join Date
- Apr 2003
- Location
- Fredericksburg, VA
- Posts
- 60
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Prevent Enter Button from Submitting
I have a form where I need to prevent enter from submitting. I produce an error when a user presses enter once completing a text field rather than clicking the submit button. There are circumstances as to why this has to work this way. I've searched old posts and have found them to suggest validation. I've validation in there at this point, but do to the process progression needed the Enter button just works about as well as a monkey wrench in gears.
I've tried onsubmit='return false' with no luck I've tried setting the onClick function I'm using on the button in an onSubmit event and that didn't work. I know it's possible to block it I just can't figure it out. Can anyone out there throw me a bone?
-
Dec 23, 2003, 17:04 #2
- Join Date
- Sep 2002
- Location
- Bournemouth, South UK
- Posts
- 1,551
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
use textarea instead of input
LiveScript: Putting the "Live" Back into JavaScript
if live output_as_javascript else output_as_html end if
-
Dec 24, 2003, 07:48 #3
I think this is what you are after
http://javascript.internet.com/forms...y-disable.html
Bookmarks