Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form won't submit on Mac IE

Status
Not open for further replies.

colep

Programmer
Jul 18, 2002
58
0
0
US
I'm trying to submit a form using an image link (using a link instead of an image form button so a mouse over image can be used). It works fine on all other browsers, but not on Mac IE - no errors are found and it does absolutely nothing.

Here's what I've tried:
1.) <a href="javascript: document.frmProduct.submit(); void(0);" ><img src="images/bt_order.gif" name="btnOrderProduct" border="0"></a>

2.) <a href="javascript: void(document.frmProduct.submit());" ><img src="images/bt_order.gif" name="btnOrderProduct" border="0"></a>

3.) <a href="javascript: void();" onClick="javascript: document.frmProduct.submit(); return false;"><img src="images/bt_order.gif" name="btnOrderProduct" border="0"></a> **This one works fine with submitting the form using a text link, but as soon as I add the image, it pukes..

Any help would be greatly apprcieated!!!!!

Thanks in advance!!!
Cole
 
Try this:

Code:
<a href="#" onclick="document.forms['frmProduct'].submit(); return false;"><img ... /></a>

Additionally, why not do this:
Code:
<input type="image" src="origimg.gif" onmouseover="this.src = 'otherimg.gif';" onmouseout="this.src = 'origimg.gif';" />

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
That did not work either... no error, it just won't submit... I was not able to get the mouse overs to work on all browsers in the input type=image...

Also, there are more than 1 form on the page each are named frmProduct + product id (frmProduct123, frmProduct 124, frmProduct125, and so on...) I wouldn't think that that would be the issue as to why it's not submitting...
 
that is the issue.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
IE on Mac can't handle submiting a form through a link if there are multiple forms on the page?
 
you can't say "submit form blah" if the form name is blah123 and blah1234.

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
I'm not using frmProduct.submit() for each, I'm using frmProduct123.submit() for frmProduct123, frmProduct124.submit() for frmProduct124, and so on...

I was just using frmProduct as an example form in the submit buttons code above so you could see how I was trying to submit the form... I am using the proper form name for each submit button... But it's still not working
 
I found out what was causing it not to submit... Evidently you have to have at least one input field in the form for Mac IE to submit the form... I didn't have any input fields as I was passing all the info through the action url... So I just created a hidden field and it worked... Just thought I'd share this with you all...

Cole ;)
 
why are you trying to submit a blank form anyway?

*cLFlaVA
----------------------------
[tt]insert funny quotation here.[/tt]
 
ya know, I'm not sure... ;) One of my co-workers built the page and I noticed that it wouldn't submit in Mac IE so I was trying to figure the problem out... I think it was done that way, cuz the page has an infinate # of forms on it and each requires about 6 or 7 hidden fields, so I think it may have been done to save loading time or what not... Still not entirely sure... :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top