I’ve always kind of wondered why the button element never really caught on. I suspect it's because people don't want to write the JavaScript hooks to actually make their buttons work (input type="submit" submits a form by default, no JavaScript needed).
After this article, I’m definitely thinking about using it more often.
http://particletree.com/features/rediscovering-the-button-element/
001 // Baxter // 05.17.2007 // 11:08 AM
I’ve been a fan of button inputs for a long time. I think one of the reasons they’ve never really caught on is because (a) too many people aren’t really aware of the different elements available to them and (b) usability folks have pounded it in our heads that everything MUST work with javascript disabled.
B is pretty easy to overcome, though, if one puts a normal submit button in the form then has the JS replace it with the button.
002 // Ryan Miglavs // 05.18.2007 // 10:53 AM
Uh, that’s funny: I just replaced a bunch of input type=”submit” with button type=”submit”, and it sure does seem to submit my forms.
003 // Jeff Croft // 05.18.2007 // 10:55 AM
Hmm, perhaps I was wrong, then. Not sure why it’s funny, though.
004 // Baxter // 05.18.2007 // 12:05 PM
Ryan, did you check it in IE? That’s the one that’s always acted funky with button for me.
005 // Ryan Miglavs // 05.18.2007 // 2:27 PM
Ooh, IE. Right. Nothing works there, I’m sure. Guess I’ll have to pull out the ol’ PC again. Wheee.
Yeah, I guess it’s not “funny: ha-ha” so much as “funny: head-scratching”.