I probably know that this is something really simple, but I can not figure out what is wrong with my code. I got this
$this->_addButton('Generate', array(
'label' => Mage::helper('adminhtml')->__('Generate'),
'onclick' => jQuery.ajax({url: "Mage::helper('adminhtml')->getUrl('adminhtml/generate/generate/')",
method: 'GET',
data: {},
success(function()
{ alert ('Generation Successful!'); }),
error(function()
{ alert ('Generation Failed!'); }),
}),
), -1);
And I am getting this error: Parse error: syntax error, unexpected '{' in C:\wamp64\www\app\code\core\Mage\Adminhtml\Block\Widget\Form\Container.php on line 68
Any help please?