[thelist] how to set default submit button?
Sarah Sweeney
mr.sanders at designshift.com
Mon Jun 14 14:23:00 CDT 2004
Hassan Schroeder wrote:
> 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?
>
> 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" :-)
Another possible solution (I'm not sure if it will work) would be to set
a tabindex for each button, and make sure that of the default button is
the lowest number.
--
Sarah Sweeney
Web Developer & Programmer
Portfolio :: http://sarah.designshift.com
Blog, etc :: http://hardedge.ca
More information about the thelist
mailing list