No announcement yet.

Issue with form button as an image on new design

  • Filter
  • Time
  • Show
Clear All
new posts

  • Issue with form button as an image on new design

    Hello Everyone,
    I am currently in the middle of moving our site to 3dcart and I am working on upgrading our design a bit and getting the look just right.I've removed the standard form button with mouseovers to an image but now that Ive done that instead of the make an offer button just taking you to the popup to make the offer it is also submits the product to the cart like if you pressed the add to cart button.

    Can anyone tell me what the heck I did wrong. Its been a long time since I had to dive into coding stuff and clearly Im rusty.


    thanks for the help. Comments on the design are welcome as well.


  • #2
    The problem is that you're using an <input type="img"> element which is essentially a form submit button. When you click on the button, it is firing its onclick event properly, but it is also submitting the form, which incidentally feeds the user into add_cart.asp. That's why both events are happening. If you don't want to get too involved with the code, the easiest solution is to replace

    HTML Code:
    <div id="Div2">
        <input name="makeonoffer" onclick="javascript:popup('makeanoffer.asp?action=newOffer&catalogid=14 ',640,410,false);" src=
        "" type="image" value="Make an Offer">


    HTML Code:
    <div id="Div2">
        <a href="javascript:void(0)" onclick="javascript:popup('makeanoffer.asp?action=newOffer&catalogid=14 ',640,410,false);">
            <img src= "" alt="Make an Offer">

    Edited: I should note that the above code isn't just going to be a simple cut/paste into your template file. If you need further instruction, find the corresponding code within your template file (the <div id="Div2"> ... </div> part) and paste it into a reply
    Last edited by mlopez99; 07-31-2015, 03:12 PM.


    • #3
      Thank you miopez99...worked perfectly:)