|
Posted by wolfing1 on October 7, 2005, 7:52 am
Please log in for more thread options
Benjamin Niemann wrote:
> wolfing1@gmail.com wrote:
>
> > 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)
>
> Untested: you may try to put the last row with your default button into the
> TFOOT element of the table:
>
> <table>
> <tfoot>
> <tr>...default submit button...</tr>
> </tfoot>
> <tbody>
> ...other rows...
> </tbody>
> </table>
>
> 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
> element.
>
OMG, this worked thanks a lot!
The more I learn, the more things I realize I don't know
|