I have created a module with name as (Ownmodule_Autocancel). In this i added a button to front end at template file named as autocancel/autocancel.phtml.The process is,it should redirect by action controller like "say hiwhn click on it". But when i click on that button it is not triggered. I don't know how to trigger that here is autocancel.phtml
<form method="post" action = "<?php echo Mage::getUrl(); ?>" id="cancelorder">
<button type ="button" title="<?php echo $this->__('Cancel Pickup') ?>" class="button btn-checkout" onclick="setLocation('<?php echo Mage::registry('token'); ?>')"><span><span><?php echo $this->__('Cancel Pickup') ?></span></span></button></p>
And my controller.php file is
<?php
class Ownmodule_Autocancel_IndexController extends Mage_Core_Controller_Front_Action
{public function IndexAction(){
$this->loadLayout();
$this->getLayout()->getBlock('head')->setTitle($this->__('autocancel'));
//echo $this->getLayout()->createBlock('core/tempete')->setTemplete('autocancel/autocancel.phtml')->toHtml();
$this->renderLayout();
}
} ?>
It just show undefined page when click on that button.