Page 1 of 1

IE and Submit Buttons

Posted: Wed Jun 02, 2010 6:22 am
by JakeJ
While not strictly a php problem, I'm trying to find the best solution to my problem.

Stupid IE will not past _$POST['submit] for the following code:

Code: Select all

<INPUT ID='submit' NAME='submit' TYPE=IMAGE BORDER=0 SRC='../images/wiz_enter.png' VALUE='bp'>
It took me quite a while to figure out that the post data was not getting passed. But how do I work around this other than just using a button? I want to use an image instead.

I have multiple submit buttons on some pages so if I use <button> then post passes ALL of the buttons and there's no way to decide which one has been pressed.

I could contain everything that requires a button in its own form but that would be very impractical for my application.

So far, my searches have turned up a lot of discussion, but not much in the way of a real solution.

As always, help is much appreciated.

Re: IE and Submit Buttons

Posted: Wed Jun 02, 2010 7:33 am
by Weirdan
JakeJ wrote: It took me quite a while to figure out that the post data was not getting passed. But how do I work around this other than just using a button? I want to use an image instead.
For images browsers (all browsers, mind you) pass 'name.x' and 'name.y' which is converted on PHP side to name_x and name_y (where 'name' is a name attribute of that button.
JakeJ wrote: I have multiple submit buttons on some pages so if I use <button> then post passes ALL of the buttons and there's no way to decide which one has been pressed.
Use http://ie7-js.googlecode.com/svn/test/index.html - it has a fix for this issue.