[eluser]Sven Delle[/eluser]
I'd like to add a javascript onChange function to an input field.
I've tried this:
Code:
$title_params = array('id' => 'title', 'name' => 'title', 'value' => $title, 'onChange' => 'java/script:do_stuff();');
echo form_input($title_params);
and (passing as second paramter):
Code:
$title_params = array('id' => 'title', 'name' => 'title', 'value' => $title);
$title_js = 'onChange=java/script:do_stuff()';
echo form_input($title_params, $title_js);
Even tried as third parameter, as it says you can do with a button in the docs. No luck.
How would I go about doing this with the form_helper?