Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
12-06-2009, 01:31 PM #1
- Join Date
- Dec 2009
- Thanked 0 Times in 0 Posts
PLS HELP! onClick won't work after display switch
This is driving me crazy!
The original code on the html file works fine, but as soon as it is swapped by onclick, the 'add to cart' button does nothing!
Here is the code:
var addDisplay = document.getElementById('cart-add'); addDisplay.innerHTML = "<a class='item_add' href='/' onclick='simpleCart.add(); return false;'><img src='images/shop/cart-add.jpg' width='118' height='26' border='0'></a>";
here is what's on the html file:
<div id="cart-add"><a class='item_add' href='/' onclick='simpleCart.add(); return false;'><img src="images/shop/cart-add.jpg" width="118" height="26" border="0"></a> </div>
PLEASE HELP, PLEASE!?
Please PM me if you need more info... or post here if you have a solution. Thanks!
12-07-2009, 12:06 AM #2
I'm beginning to believe that simpleCart.js was invented to cause tons of people to lose lots of time finding all the problems. It's neither simple (internally) nor particularly well written, by today's standards.
I have no idea what you mean by "swapped out" since the code being "swapped in" there is identical to what's already in place.
Can you show this live on a test site???
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.