Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi guys,

I have recently tried to make a complex edit form easier to understand by
using the <button> tag to add icons to buttons.

The form contains several submit buttons with different names/values to
control elements of the form such as adding/deleting rows in a repeating

However when I converted the <input> buttons to <button> buttons I found
that in PC IE clicking one resulted in *all* the button name/values being
submitted, not just the one clicked (making them totally useless). In
mozilla and other browsers the behaviour is that of <input> buttons, where
only the clicked button's name/value is submitted.

As the W3C html 4 spec says "Buttons created with the BUTTON element
function just like buttons created with the INPUT element" I'm guessing that
IE is (as usual) treating the buttons incorrectly. If so, does anyone know
of any workarounds/fixes I can do? Javascript is not an option, and I'd
rather not resort to using graphical <input> buttons

Andrew Crowe


Andrew Crowe wrote:
Quoted text here. Click to load it

The default is type="submit", not type="button".

"submit: Creates a submit button. This is the default value."



Quoted text here. Click to load it

<button> is broken, both on browsers that don't support it and on
browsers like IE that do "support" it. Use <input> instead.

Quoted text here. Click to load it

Especially in such cases run away from <button>.

Quoted text here. Click to load it

Moreover, it uses the _content_ of the <button> element as the value,
not the value of the value="..." attribute.

Quoted text here. Click to load it


<input type="submit"> rules OK.

If you think they will give users too many hints of what's going on,
like their being submit buttons, use CSS to tune the visual appearance.

Yucca, /
Pages about Web authoring:

Site Timeline