I needed to make the wishlist link a button so i changed the code in addTo.phtml from
<li><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;" class="link-wishlist"><?php echo $this->__('Add to Wishlist') ?></a></li>
<button type="button" class="button fabriqButton2"><a href="<?php echo $_wishlistSubmitUrl ?>" onclick="productAddToCartForm.submitLight(this, this.href); return false;"><span><span><?php echo __('Add to Wishlist');?></span></span></a></button>
For some reason this works in Chrome and Firefox, but not in IE.
Does anybody know a way to get this to work as a button?
Try to avoid the use of an
<a>tag inside the<button>tag. Instead move everything to the onclick of the button and remove the<a>tag.And your second question:
NOTE
setLocation is a custom method from Magento. If you would need this for other projects you would most likely use
window.location.href = 'http://www.google.com/'