Jump to content

Problem in IE with a javascript form submissions


refiking

Recommended Posts

So, here's the issue. I have an add to cart link at the top of the page that submits a form toward the end of the page.  It works in FF, but not IE.  What am I doing wrong here?

 

Here is the link:

<a href="Javascript:document.addtocart.submit();" style="text-decoration:none;"><button style="background-color:#3355CA; color:#FFFFFF; font-weight:bold; font-size:12px; padding-bottom:2px;">Add To Cart</button></a>

 

That won't work Mr. LOL, there are about 25 forms between the add to cart link and the addtocart form itself

 

<sarcasm>Oh sorry, I didn't notice that in your very detailed description of your problem</sarcasm>

 

Try that:

 

<button onclick="document.addtocart.submit()" style="background-color:#3355CA; color:#FFFFFF; font-weight:bold; font-size:12px; padding-bottom:2px;">Add To Cart</button>

Got it working from another forum, but here is the answer if anyone else needs it:

 

<button style="background-color:#3355CA; color:#FFFFFF; font-weight:bold; font-size:12px; padding-bottom:2px;" onclick="Javascript:document.addtocart.submit();">Add To Cart</button>

Archived

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.