php_dave Posted July 30, 2008 Share Posted July 30, 2008 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.. Cheers Dave Quote Link to comment https://forums.phpfreaks.com/topic/117423-solved-form-submission-ie-vs-moz/ Share on other sites More sharing options...
ToonMariner Posted July 30, 2008 Share Posted July 30, 2008 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. Quote Link to comment https://forums.phpfreaks.com/topic/117423-solved-form-submission-ie-vs-moz/#findComment-604004 Share on other sites More sharing options...
php_dave Posted July 30, 2008 Author Share Posted July 30, 2008 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... Thanks Quote Link to comment https://forums.phpfreaks.com/topic/117423-solved-form-submission-ie-vs-moz/#findComment-604011 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.