Jump to content

[SOLVED] Form Submission IE vs Moz


php_dave

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

 

Cheers

Dave

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

 

Thanks

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.