[thelist] submit button 'focus'

rudy r937 at interlog.com
Wed Feb 12 12:00:01 CST 2003

> It seems that the first button in the HTML is the one that gets it.
> ==================
> <form name="test">
> foo <input type="text">
> <input type="submit" name="fun" value="submit">
> <input type="submit" name="goo" value="submittoo">
> </form>
> ==================

care for a hack?

foo<input type=image src="spacer.gif" width="1" height="1">

using the tab key, you reach this image before the text box, which, if
someone is tabbing from other fields above these, will require an extra tab
to get to the text box

but it does work to prevent the first of the two subsequent submit buttons
from being highlighted

i think

i guess you would add value="submitneither" (to catch that situation)
because this is probably the field that internet explorer will submit if the
users presses enter


More information about the thelist mailing list