I want to submit my form on the same page :
<form action="<?php echo Mage::helper('checkout/cart')->getAddUrl(Mage::registry('current_product')); ?>" method="post" id="seller_addtocart_form1" class="ma"> <button id="<?php echo $seller->getMpassignproductId() ?>" class="button btn-cart customaddtocart" title="<?php echo $this->__('Add to Cart')?>" onclick="<?php echo $currentUrl = Mage::helper('core/url')->getCurrentUrl();?>"> <?php echo $this->__('Add to Bag')?></span></span></button> </form>
Form is submitted in cart page so I use
onclick() function in button but it won't work.
Can anyone please guide me, what's wrong in my code ?