[thelist] how to set default submit button?

Hassan Schroeder hassan at webtuitive.com
Mon Jun 14 13:41:26 CDT 2004

Johnson, Christopher (MTO) wrote:

> I have a jsp page that has 12 submit buttons on it all associated with a
> single form. 

> The problem is that the boss wants it so that if the person is in the form
> and they hit enter (to process the form) the submit button that is selected
> is actually the 11 button and not the first submit button on the page. (did
> that make any sense?) 
> Is there anyway to set a default submit button for a page? 

I don't see anything in the HTML spec about either specifying the
default of multiple submit buttons, or which one should be used if
*none* are clicked.

But assuming it's the first one -- possibly a dangerous assumption
if that behavior is implementation-dependent -- how about putting
a copy of Submit Button #11 first in the form and hiding it with
CSS? An input with 'display: none' can still be "successful" :-)

Hassan Schroeder ----------------------------- hassan at webtuitive.com
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.

More information about the thelist mailing list