Thanks acoder,
I would like to do that with the link in case of js being disabled, but I'm not sure how yet. I can barely get the link changing to work =\
How do you just change the onclick:?
I think the problem is that the js file only "displays" the other elements needed for the add to cart to work, but doesn't actually place it in the htm file, which is what I think needs to be done...
...
User Profile
Collapse
-
Oh, okay, I used that code for the rest of the javascript... for the switch out, and it makes the switching work a lot better, without taking me to the top... thanks!!
But I still need help with adding the other items to the cart... I input the same code into the javascript file, and it switches everything out great, but then the add to cart button doesn't work anymore... PLEASE!! ANYONE?? Is my request clear? Or do I need to give more...Leave a comment:
-
Thanks Dormilich,
but that's actually the last thing I tried, and it still won't work =[
Any other ideas?Leave a comment:
-
Thanks for replying... here is the original code in the htm file:
<div id="cart-add"><a class="item_add " href="javascrip t:;"><img src="images/shop/cart-add.jpg" width="118" height="26" border="0"></a>
</div>
the link adds an item to the cart just fine, but when it is switched out with the...Leave a comment:
-
HELP href="javascript not working inside javascript file
I used this code inside of a javascript file to switch out an 'add to cart' button:
the original 'add to cart' button that is in the htm file works, but when it is switched out with the one...Code:var addDisplay = document.getElementById('cart-add'); addDisplay.innerHTML = "<a class='item_add' href='javascript:;'><img src='images/shop/cart-add.jpg' width='118' height='26' border='0'></a>";
No activity results to display
Show More
Leave a comment: