PDA

View Full Version : Disable "Enter" Key in Form not running



Danjel
03-15-2010, 07:53 AM
1) Script Title: Disable "Enter" Key in Form

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex16/disableenter.htm

3) Describe problem: It just doesn't work.....
I have tried to remove the other script running on the same line, same (read no) result.
I use it here:
http://www.printlight.dk/bestil-bizcard.php
It's applied to "<input id="antal" ....>"

Have made a copy here:
http://www.printlight.dk/bestil-bizcard-dd.php
With only this script on the field.

I have searched through the code, there is no duplicate valuenames, or scriptnames.

/Danjel

ddadmin
03-16-2010, 08:55 AM
When you press "Enter" within the "Antal navne" INPUT field, does your form submit anyway? In FF3.5 at least, it doesn't, which seem to suggest the script is working.

Danjel
03-16-2010, 11:40 AM
No, it doesn't submit, even if I check the checkbox at the bottom, just above the "Se ordre" button.
The "Se ordre" is the submitbutton.
My main reason for using this script was to have it go to the next field, and that doesn't work.
Not submitting is handled by the checkbox at the bottom, also one of your scripts :-)
http://www.dynamicdrive.com/dynamicindex16/acceptterm.htm

What I want, really, is to have it go to the next field, and trigger the "onchange" for that field (antal).

Thanks for a great site :-)

/Danjel

Danjel
03-17-2010, 08:23 AM
Have investigated further.

Using "alert" popups, I have confirmed that the script is running.
The form is not submitted.
However the focus is not moved to the next field.

Furthermore, according to my tests, the script does not catch the enter key in IE 7.0.5730.11 on winXP pro.

TIA
/Danjel