How do I add onload javascript on code igniter forms? Id like to achieve a code like this in code igniter
form onload="yourscript"
Codeigniter uses a form_open()
command so I dunno how to add the onload script.
How do I add onload javascript on code igniter forms? Id like to achieve a code like this in code igniter
form onload="yourscript"
Codeigniter uses a form_open()
command so I dunno how to add the onload script.
You can add attributes like that
$this->load->helper('form');
$attributes = array('onsubmit'=>'abc()');
echo form_open('url', $attributes);
form has no method of 'onload',so it makes no effect even if you set.