Forum Moderators: open

Message Too Old, No Replies

input type="image" not submitting in IE5,IE5.5

         

quarantine

2:26 pm on Sep 15, 2004 (gmt 0)

10+ Year Member



I am having problems with the above mentioned browsers submitting a form.
If I have:
<input type="submit" value="send" name="submit" />
it works correctly, but when I try to change it to an image as in:
<input type="image" src="send.gif" name="submit" />
IE5 and IE5.5 won't submit the form.

MozMan

7:20 pm on Sep 17, 2004 (gmt 0)

10+ Year Member



I may be misunderstanding the problem, but here is what I think:

Your input type=image is not a form submission type, so you need to tell it to submit the form, using javascript or something. The input type=submit has that functionality already built in.

Try something like this:

<input type="image" src="send.gif" name="submit" onclick="javascript:document.frmFormName.submit();" />

the javascript command in onclick tells the browser the purpose of this specific input is to submit the form. (BTW, change frmFormName to match your form name or id).

musicales

2:53 pm on Sep 18, 2004 (gmt 0)

10+ Year Member



type="image" should work as a submit button without any onclick. Have you tried removing the backslash at the end? Also ensure that the <form> and </form> are correctly surrounding it and that you don't have extra forms somewhere else on the page left open.

coopster

5:18 pm on Sep 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



How do you know it isn't submitting the form? What I mean is, are you checking some variables server-side that are determining whether or not it was submitted? If so, this thread regarding Form processing problem with input type=image! [webmasterworld.com] in the PHP Forum may be enlightening.