Internet Explorer and image input weirdness

Hit a weird IE snag lately. It turns out that if you use an image input type in a form, Internet Explorer 6 and 7 mysteriously send back the x and y coordinates of where you clicked on the button!

Not only this, but if you try to read these values in afterwards, it is difficult at best. In fact, we couldn’t work out any way to actually read them in. 

After a bit of searching around, it turns out that the best way to deal with this, is to style normal submit buttons so that they look like image inputs instead. 

Something like this seems to be the best workaround:

input#my_button {
background:url(../pathto/images/my_button_bg.gif) no-repeat top left;
border:0;
}

That’s what we have for now but we’ll be looking around for other solutions.

1 Comment so far

  1. yES THATS one problem among the many with IE. *gratuitous link removed :) *

    bILL
    April 7, 2009
    7:28 am

Leave a comment