[thelist] hack to use Enter instead of Tab on forms
Matt Warden
mwarden at gmail.com
Wed Feb 2 21:46:20 CST 2005
On Wed, 2 Feb 2005 22:27:10 -0500, sbeam <sbeam at onsetcorps.net> wrote:
> should _theoretically_ work... but as we all know Enter is used to
> submit the form by default, and I have a hunch that some IE5/Mac bug is
> going to ruin my day.
Just a thought: you might be able to get around some of these 'bugs'
by adding an onsubmit to the form. Basically, you might only allow
submission if it's by a click of the submit button.
Your JS skills are greater than mine, so this is only for demonstration:
var isSubmitAllowed = false;
document.forms[0].onsubmit = function() { return isSubmitAllowed; }
document.getElementById('submitBtn').onclick = function() {
isSubmitAllowed=true;
document.forms[0].submit();
} // end function
That is, if you run into this problem. Hackish, probably, but I don't
think that really matters since you have a limited audience that
doesn't like the way it's "supposed to be".
I don't think it's the best idea, because she might get used to
hitting submit to change fields. But, she who pays the bills specs the
project.
Does this help?
--
Matt Warden
Miami University
Oxford, OH, USA
http://mattwarden.com
This email proudly and graciously contributes to entropy.
More information about the thelist
mailing list