[eluser]Krystian[/eluser]
Hi,
I need to create a form button with onClick
I`m trying like this but I`ve got some problems with apostrophes
Code:
$property_type_edit = array(
'id' => 'btn_orange',
'content' => 'Edit',
'onClick="document.location.href' => base_url() . 'controller/method'
);
echo form_button($property_type_edit);
but this produces me
<button name="" type="button" id="btn_orange" onClick="document.location.href="http://www.myapp.com/controller/method" >Edit</button>
and it is not working because I need to put whole http ... in single '