I create a custom module named connector,company name is social.in that,there is a controller i.e. Social_Connectors_Customer_AccountController .in this controller ,action method is
public function connectAction()
{
$this->_redirect('customer/account');
}
now,when i call this action method on click of my link,controller is somehow not called.and give me error like :The page you requested was not found, and we have a fine guess why.
java script in my phtml file is:how to call controller’s action method in this script?
document.observe('click', function(e){
var target = e.findElement('a[rel^=google]') || e.findElement('button[rel^=google]');
if (target && target.readAttribute('rel')=='google')
{
alert('<?php echo $this->getUrl(); ?>');
}
});
or can anybody say how to call controller on click of my link?
to call controller action,you must have to follow strucure of mvc magento module.and the function getUrl() must be define properly.check its defination.