Why not replace the submit button with an image or link, and then
submit the form via JS as well?
[EMAIL PROTECTED]
On Jun 8, 2007, at 1:06 PM, Glenn Little wrote:
I've got a form used by 10-key users, which means they need
to be able to hit the <enter> key to move from field to field.
I've got a javascript function applied to each of the form input
elements' onkeypress event. It checks to
see if the keycode was 13, and if so it sets the new focus
to the form field with the next higher tabindex.
Works great in Firefox. In IE it works as long as there
are no <input type="submit"> elements. If a submit element
is present, the <return> key just submits the form.
Interestingly, if I put an alert() in my key handler, it
is triggered in firefox by both <tab> and <return>. In
IE though, it is not triggered by <tab>, but is triggered by
<return>. I'm confused by that since given the symptom, I'd
have thought the <return> key was being intercepted, not the
<tab>.
Any ideas what the problem is? Am I missing something helpful in
rails and/or prototype?
Thanks in advance...
-glenn
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby
_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby