Trapping Enter Key 
Author Message
 Trapping Enter Key

I have a form with multiple HTML input boxes for the user to fill out before
the form is submitted. I can trap the "Enter" key and make it behave like
the "Tab" key to move forward through the HTML input boxes but when I do
this I stop the submit button from functioning correctly and am no longer
able to submit the form.

It seems that pressing the "Enter" key anywhere on the form fires the
"onClick" event of the Submit button.

What I would like is to stop the "Enter" key from submitting the form and
only allow the form to be submitted by clicking on the Submit button. This
would allow the user to use the "Enter" key as well as the "Tab" key to move
between form fields.

Any ideas or suggestions?

Thanks,
Kevin W. Miller



Mon, 15 Jul 2002 03:00:00 GMT  
 Trapping Enter Key
Figured it out. Thanks anyway.

Kevin W. Miller

Quote:

>I have a form with multiple HTML input boxes for the user to fill out
before
>the form is submitted. I can trap the "Enter" key and make it behave like
>the "Tab" key to move forward through the HTML input boxes but when I do
>this I stop the submit button from functioning correctly and am no longer
>able to submit the form.

>It seems that pressing the "Enter" key anywhere on the form fires the
>"onClick" event of the Submit button.

>What I would like is to stop the "Enter" key from submitting the form and
>only allow the form to be submitted by clicking on the Submit button. This
>would allow the user to use the "Enter" key as well as the "Tab" key to
move
>between form fields.

>Any ideas or suggestions?

>Thanks,
>Kevin W. Miller



Tue, 16 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. trapping enter key in web form??

2. Need Help Trapping Enter Key

3. trap enter key

4. trapping enter key

5. trapping the enter key?

6. Trap the <enter> key

7. Trapping Of Enter Key In VB

8. How do you trap the Enter key?

9. Trap the Enter Key

10. How to trap Numeric Keyboard Enter Key ?

11. How to trap TAB, ENTER ans ESCAPE keys

12. How to trap TAB, ENTER ans ESCAPE keys FROM an Ocx

 

 
Powered by phpBB® Forum Software