We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43441
    • 1 Posts
    rickster20010 Reply #1, 11 years ago
    Not sure if this is in the right place so please excuse me if it's not.

    Ok we are running modx and I have a form which post product data using an image as a clickable button
    see url:http://www.alphabiolabs.com/paternity-test.html

    it the first banner at the top of the page - the problem is I cannot get it to work in IE. it works fine in the other browsers. I have been trying for days now to sort this so any help would be most appreciated.

    The code I'm using is below:

    <form id="shopping" action="shopping-basket.html" method="post">
    <p><strong>[*product_name*]</strong></p>
    <p><strong>Price: £[*product_price*]</strong> <i>plus VAT (£[*product_price_vat*])</i></p>
    <p><img src="assets/images/buy-now-button00001.png" border="0" alt="Add to basket" onclick="document.forms['shopping'].submit();" align="middle" /></a></p>
    <input type="hidden" name="product_name" id="product_name" value="[*product_name*]" />
    <input type="hidden" name="product_price" id="product_price" value="[*product_price*]" />
    <input type="hidden" name="product_price_vat" id="product_price_vat" value="[*product_price_vat*]" />
    <input type="hidden" name="product_code" id="product_code" value="[*product_code*]" />
    <input type="hidden" name="product_qty" id="product_qty" value="1" />
    <input type="hidden" name="product_action" id="product_action" value="add" />
    </form>
    • try changing your onclick event to:

      document.getElementById('shopping').submit();


      Also you could use a standard button tag with the image and avoid JS completely.
        Evo Revo // Ubuntu, CentOS, Win // Apache 2x, Lighttp (Lighty)
        Visit CharlesMx.com for latest news and status updates.