Jump to content

using image as an input submit doesn't work in IE


webguync

Recommended Posts

I think this is an IE issue. I have a submit button for a form and when I use an image as the submit button it doesn't work in IE. Works fine in FF though. When I take out the image part and just use the default submit, works fine in IE.

Here is the code with the image

 

echo '<input name="Update" type="image" value="submit" id="Update" src="images/Update.png" />

 

 

 

you could try:

echo '<button name="Update" type="submit" id="Update"><img src="images/Update.png" /></button>';

 

 

then add this to the CSS to stop it looking like an ordinary submit button:

button {
  border: 0;
  background: none;
}

 


 

alternatively, you could use a button with no value, and add an image background to it using CSS.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.