Order of buttons?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

My boss wants me to do some forms without any type of scripts, just
pure HTML/ASP.
I have this table with 3 rows, each row has an <input=text> and ends
with an <input type=submit> buttons, and the last row has what I want
to be the default <input type=submit>.  Problem is, when I press
<enter> in any of the text fields, it acts as if the first row's submit
button was pressed.
How can I affect this behaviour if I want to keep the appeareance of
the page? (without scripts), it should also work in most browsers (not
only IE)

Re: Order of buttons?

On 06/10/2005 17:37, wolfing1@gmail.com wrote:


Quoted text here. Click to load it

This is the problem with using multiple submit buttons.

Quoted text here. Click to load it

IE will choose the first submit button as the default. Other buttons can
be activated with the Enter key, but they must be given focus first
which won't happen if the user is interacting with another control (and
isn't behaviour that could be reliably changed with a script, anyway).


Michael Winter
Prefix subject with [News] before replying by e-mail.

Re: Order of buttons?

wolfing1@gmail.com wrote:

Quoted text here. Click to load it

Untested: you may try to put the last row with your default button into the
TFOOT element of the table:

    <tr>...default submit button...</tr>
    ...other rows...

The TFOOT must preceed the TBODY, but is displayed below TBODY - so it may
be exactly what you want (if browsers determine the 'first' submit button
based on the source order).
And this should IMHO even be a semantically correct usage of the TFOOT

Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://www.odahoda.de /

Re: Order of buttons?

Benjamin Niemann wrote:
Quoted text here. Click to load it
OMG, this worked thanks a lot!
The more I learn, the more things I realize I don't know

Site Timeline