[thelist] Form Submittal on Enter

.jeff jeff at members.evolt.org
Tue Jan 29 13:29:00 CST 2002


andrew,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: Andrew Clover
>
> Fair enough I suppose. I personally actually don't mind
> the behaviour - as you point out, Windows does it
> globally, and I'm used to it - it just tends to trip
> less experienced users up quite often.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

this is why it's even more important to use client-side validation to
improve the user experience.  there's no reason to make a roundtrip to the
server to find out you forget a required field.  what's even better is that
using the onsubmit event handler, you don't even have to trap for any
particular key usage.  no matter how they submit the form, you're validation
routine will get run.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> This is the main problem with IE's enter-to-submit for
> me personally. If you're going to have a 'default'
> button chosen, it would be nice to be able to choose
> which one it is. The 'first button in source order' is
> rarely the best choice, since Submit buttons are often
> at the very bottom of the form.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

huh?  what does the placement of the group of submit buttons within the form
have anything to do with it?  furthermore, if you know the first is going to
be the default, that's easy to account for in the html, whether or not the
default one appears to be the last on the rendered page.  for an example of
what i'm talking about, check out this page:

http://www.mtbachelor.com/e_center/pass_wizard/

click the "continue >>>" button until you get to a screen with text boxes.
you'll notice that the right-most button is the default.  looking at the
source you'll see it's because i've used some table trickery to get it to
appear first in the source, but last in the display of the form.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> It would have been far better simply to submit no
> name/value pair in this case, and let the script decide
> what the default is.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

the server-side script or the client-side script?  if it's the server-side,
how would it know which one was default unless you implicitly coded the
default in?  by definition, a button is not successful and should not send
data unless it's been clicked.  if it's client-side, how would you propose
that non-client-side capable devices handle it?

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> This would also have matched the established behaviour
> of passing no pair when submitting a single-text-field
> form with enter.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

without a submit button of any kind?  or just one single-line text input?  i
personally think pressing the "enter" key should "click" the default button
consequently sending it's name/value pair (if appropriate -- ie, it has a
name) in the request.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > (no, supposed anti-trust issues don't play into this
> > issue even a millionth as much as you anti-ms crowd
> > would look the rest of us to think so feck off.  ;p).
>
> Oof! Touchy! :-)
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

let's just say i'd rather not cloud the issue with any anti-ms rhetoric.  ;p

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/





More information about the thelist mailing list