IE button bug

Yet another bug in IE.

I would like to report this Windows Internet Explorer bug to save other greif. Seems that IE 6 (well, version: 6.0.2900.2180.xpsp_sp2_gdr.050301-1519 to be specific) doesn’t handle the <button> tag very well, especially when it is of type submit.

I have a form that allows multiple actions to be preformed on the selected data. Each action has a button with a value and they all share the same name. Something like:


<button type="submit" value="send_email" name="act">Send email</button>
<button type="submit" value="delete" name="act">Delete</button>

This button works but the value that IE submits is always ‘Delete’ (note the capital!?). Seem that when a form has more than one button of type submit IE will always pass the value of last one on the form no matter which button is pressed. This is not the case for <input> buttons.

Guess this means it doesn’t fully support HTML 4, or is this a ‘feature’ not a bug?

14 thoughts on “IE button bug”

  1. I found this with google. Here we are six months later and I’m still having one heck of a time with IE’s handling of “button” as described above.

    What is recommended? Change all my buttons to inputs? I *just* finished changing them TO buttons for added value.

  2. Ya, you have to change them to inputs to get it to work in IE6. IE7 is just around the corner but we’d still have to maintain backward compatibility for at least a year after its official realise.

    Ugly but true.

  3. “we’d still have to maintain backward compatibility for at least a year”

    I wish it was just a year…

    Hi, 2006/2007 people, I’m from the future and still having as a requirement by clients to have perfect backward compatibility for the horrible IE6 in December, 2009!!!! ;-)

    I’m too having this very problem, and now have to change all buttons in my site to inputs. IE6 is still really holding back the web.

    Just a few days away from 2010, and we still have to support that piece of crap software created back in 2001 :-((((

  4. Now it’s 2010 and IE8 is out but nothing has changed. Reason is: it’s not an IE problem – it never was. It is because IE uses a Windows library to do form elements. This library simply has no handling for “button”-tags as there are none in Windows. None at MS ever solved this issue. Thus IE converts it to an input-tag and handles the values as such.

    Similar problems with type=”file” and select-boxes. Very little CSS-support for both as the Windows library in use does not support that. Microsoft will obviously never fix it. Shame on them!

    Instead you should try this one: and in your server scripts use: if (act[“delete”] != “”) act = “delete”;

  5. Sorry – it cut the HTML example code. Here it is:

    HTML: {input type=”submit” name=”act[delete]” value=”send”/} and in your server scripts use: if (act[“delete”] != “”) act = “delete”;

  6. osix :

    osix :
    Hi,
    I’ve discovered even simpler workaround.
    Add the onclick attribute and set it as this:
    {button type=”submit” name=”action” value=”chgEmail” onclick=”this.value=’chgEmail'”>Zmeni? e-mail</button}

    osix :
    Hi,
    I’ve discovered even simpler workaround.
    Add the onclick attribute and set it as this:
    Change e-mail

    osix :
    Hi,
    I’ve discovered even simpler workaround.
    Add the onclick attribute and set it as this:
    Change e-mail

  7. From further in the future… 2012, and IE6 is still here, in a pretty big way… problem is that a LOT of corporate and nearly all central and local government still use IE6, 6 years after the “support it for one year” comment… These types of orgs do not show up on webstats, as they do not use those sites, however they are 60% of my 50,000+ userbase…. still….

Comments are closed.