1 / 3
Jul 2012

After doing some research on the forums I was ably to customize my "Add to Cart" button and changed the PayPal image to another checkout image. In doing so, the View Cart button no longer works.



Here is the code for my "View Cart" button. Any help would be appreciated.



<a href="https://www.e-junkie.com/ecom/gb.php?c=cart&cl=216916&ejc=2"

target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return

EJEJC_lc(this);">

<img src="https://www.e-junkie.com/ej/ejview_cart.gif" border="0">

</a>

<script language="javascript" type="text/javascript">

<!--function EJEJC_lc(th) { return false; }

function EJEJC_config() {

// will call EJEJC_shown function after the cart has rendered

EJEJC_POSTCALL=true;

}

function EJEJC_shown() {

jQuery("#btnPP").attr("src","http://www.artsupplies.co.uk/files/images/proceed-to-checkout-button.gif");

}

// -->

</script>

<script type="text/javascript"src="https://www.e-junkie.com/ecom/box.js"></script>

  • created

    Jul '12
  • last reply

    Jul '12
  • 2

    replies

  • 1.2k

    views

  • 2

    users

  • 5

    links

The problem is the linebreak in this part:



target="ej_ejc" class="ec_ejc_thkbx" onClick="javascript:return

EJEJC_lc(this);">



The attribute onClick="javascript:return EJEJC_lc(this);" can't be split into separate lines.



Also, I would recommend adding a linebreak after the <!-- like so:



<!--

function EJEJC_lc(th) { return false; }

...etc.

Awesome!!! Thanks for the quick response!!! Works perfectly now!!!