how to use helper buttons in single page?

Permalink 2 users found helpful
I'm using
$form=Loader::helper('form');
print $form->button('bttn1');

I want to call controller function when the button is clicked.
Where I want to specify my function name?

Can any one show any example line of code for this...?

cjramki
 
adajad replied on at Permalink Reply
adajad
cjramki replied on at Permalink Reply
cjramki
I think I should rephrase my question.
I just need, how to call controller function using button?
ronyDdeveloper replied on at Permalink Best Answer Reply
ronyDdeveloper
$form = Loader::helper('form');
$form->button('bttn1', 'Click', array('onclick' => "window.location='Your Controller Function Path'")) {


Rony
cjramki replied on at Permalink Reply
cjramki
Thanks @Rony, This is what I need..
cjramki replied on at Permalink Reply
cjramki
can we use url redirection in onclick event of a button?