I have the following code of button
:
<button type="button" title="<?php echo Mage::helper('core')->quoteEscape($this->__('View all items in your shopping cart')) ?>" class="button btn-inline-ver-carrinho" onclick="setLocation('<?php echo $this->getUrl('checkout/cart') ?>')"><span><span>Ver Carrinho</span></span></button>
In event% with% of this onclick
, it returns me a full button
, but when I use this code by jQuery using url
as follows:
$j('#mini-cart').append("<button type='button' title='<?php echo Mage::helper('core')->quoteEscape($this->__('View all items in your shopping cart')) ?>' class='button btn-inline-ver-carrinho' onclick='setLocation('<?php echo $this->getUrl("checkout/cart") ?>')'><span><span>Ver Carrinho</span></span></button>");
The same code returns me in .append()
to onclick
, but without the slashes (/) and executing this code normally without using jQuery, url
is shown correctly.
By url
, it returns me the following: php
By onclick="setLocation("localhost/checkout/cart")"
, it returns me the following:
onclick="setLocation("localhost checkout cart')'