IE and Submit Buttons

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
JakeJ
Forum Regular
Posts: 675
Joined: Thu Dec 10, 2009 6:27 pm

IE and Submit Buttons

Post 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.
User avatar
Weirdan
Moderator
Posts: 5978
Joined: Mon Nov 03, 2003 6:13 pm
Location: Odessa, Ukraine

Re: IE and Submit Buttons

Post 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.
Post Reply