20050620 Monday June 20, 2005

HowTo set the default submit button on a form Howard has a nice little trick for setting the default submit button on a form. Basically, you just put the default button first, and then use style="display: none" to hide it. For the most part, I haven't had any issues with putting the default submit button first (i.e. "Save"), but I have noticed an issue when developing wizards (b/c "« Previous" is likely to be first). Nice tip Howard. Posted in The Web at Jun 20 2005, 08:58:53 AM MDT 3 Comments

Comments:

Seems like a good try, but fails mildly on accessibility - the button would appear to a non-css-savy accessible browser twice.

Posted by will budreau on May 05, 2006 at 06:00 PM MDT #

This didn't work for me in internet explorer 6.

I used a div with style="display: none" and that worked.

Posted by boris on August 17, 2007 at 06:58 AM MDT #

Wont' work on IE7. Solution is to use same color for text and background of the button as the background of the body.

Posted by pederbl on April 18, 2008 at 05:13 PM MDT #

Post a Comment:
  • HTML Syntax: Allowed
Click me to subscribe
Matt Raible is a Web Architect who enjoys developing applications with open source technologies. Contact me for rates.
« January 2009
SunMonTueWedThuFriSat
    
1
2
3
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
       
Today

Recent Entries

Tag Cloud