webguync Posted May 27, 2010 Share Posted May 27, 2010 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" /> Link to comment https://forums.phpfreaks.com/topic/203134-using-image-as-an-input-submit-doesnt-work-in-ie/ Share on other sites More sharing options...
haku Posted May 28, 2010 Share Posted May 28, 2010 When you submit with an input type image, the post values are: $_POST['Update_x'] and $_POST['Update_y'] (as Update is the name of your submit). These are the coordinates where you clicked. Link to comment https://forums.phpfreaks.com/topic/203134-using-image-as-an-input-submit-doesnt-work-in-ie/#findComment-1064447 Share on other sites More sharing options...
jacko310592 Posted May 28, 2010 Share Posted May 28, 2010 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. Link to comment https://forums.phpfreaks.com/topic/203134-using-image-as-an-input-submit-doesnt-work-in-ie/#findComment-1064606 Share on other sites More sharing options...
webguync Posted May 28, 2010 Author Share Posted May 28, 2010 yea, I think I will try that route, thanks. Link to comment https://forums.phpfreaks.com/topic/203134-using-image-as-an-input-submit-doesnt-work-in-ie/#findComment-1064667 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.