Jump to content

[SOLVED] Form Submission IE vs Moz


Recommended Posts

Hey guys,


I am currently working on a submission form which uses an image to submit and a onSubmit handler in the <FORM> tag to fire a javacsript dialog box..


Form declaration

<FORM action='".$PHP_SELF.' method='POST' onSubmit=\"return confirmBox('Save Changes?');\">


Submit Button

<INPUT type='IMAGE' name='Submit' src='images\accept.png' value='Add' />


There are a bunch of fields that are submited with the form - now in Moz this works fine but in IE 6 and 7 although the page is refreshed (so i am assuming action is called) no $_POST info is passed with it...


Anyone aware of any issues with onSubmit in Form tags or issues with using image inputs as buttons?  got me confused this one.  ???


Any help would save the last strands of hair on my head..




Link to comment
Share on other sites

print your post array - you will see that some browsers (I always get them the wrong way around so I'm going to refrain from saying which does what) have the coordinates of the image that was clicked others just treat the image input as a normal submit button.

Link to comment
Share on other sites

Bang on Toon.


<INPUT type="image" src="images/accept.png" name="Submit" value="Add" />


In moz this passes post values of


Submit Add

Submit_x 10

Submit_x 4


in IE it passes only

Submit_x 10

Submit_x 4


Well what a waste of 3 hours of my life lol..  just for info I have fixed it by adding a hidden field to my form.

<INPUT type="Hidden" Name="Submit" Value="Add" />


Tested in both IE and Moz and both now function correctly...  ;D




Link to comment
Share on other sites


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.