Announcement

Collapse
No announcement yet.

Customising the button - but not in a way that's been answered before...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Customising the button - but not in a way that's been answered before...

    I want to have a custom button for 'add to cart', but I can figure out how to do it. I have searched, but can't find any posts that answer this specific question...

    The standard 'button' text (below) does the 'button pushed' effect when pressed, but I can't use my own image and am stuck with a boring grey button...
    <Actinic:ACTIONS><P><INPUT TYPE=SUBMIT VALUE="Add To Cart" NAME="19"></P></Actinic:ACTIONS>
    On the other hand I can use the standard 'image' (below) which allows me to use my own button, but I don't know how to get the 'button pushed' effect when it's clicked on...
    <INPUT TYPE=HIDDEN NAME="Q_19" VALUE="1"><Actinic:ACTIONS><P><INPUT TYPE="image" SRC="add_to_basket.gif" NAME="19" WIDTH="77" HEIGHT="18" BORDER="0"></P></Actinic:ACTIONS>
    The problem is that if there is no 'button pushed' effect when it it pressed and the user has a slow link (or the server is slow) they may wonder if anything has happened and press the button again. This results in the item being added to the basket multiple times.

    So... my questions are - can I customise the button input type? or can I get the 'button pushed' effect on the image input...?
    John

    #2
    you need to preload a 2nd button image for the onclick event and code the add-to-cart button with as javascript onclick event:

    http://www.htmlgoodies.com/beyond/ja...le.php/3470771

    Seems like a lot of work, but good luck!
    Web Design & Ecommerce - Affordable Web Hosting
    Free and low cost Merchant Accounts coming soon..
    NOD32 Antivirus - Reciprocal Links for Actinic Sites ONLY

    Comment


      #3
      There may also be a way using STYLE to make the normal button look like what you want.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Originally posted by webyourbusiness
        and code the add-to-cart button with as javascript onclick event:
        I see how the onclick event works, but I'm not sure what 'event' to use to overwrite the existing graphic with another one...?
        John

        Comment


          #5
          Something like onclick="this.src='waitimage.gif';return true;" should do it.

          You should ensure that waitimage.gif is preloaded (e.g. put it in Act_Primary.html with a size of 1 x 1) and use it as a full stop (this will also make sure Actinic uploads it for you). Or preload it via JavaScript.

          If you want to be real fancy you could make the image a dynamic gif showung a ticking clock, etc.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment

          Working...
          X