[eluser]Thorpe Obazee[/eluser]
[quote author="PEN Vannak" date="1246262984"]How can I add the fourth parameter to the form_dropdown?
I just want to add function called "onchange" to check the form_dropdown().
Lets see my code:
Code:
$data=array('mem_name'=>'Member','use_name'=>'Employee','boo_title'=>'Book','date_borrow'=>'Date Borrowed');
$onchange=array('onClick'=>'[removed]search_by_date();');
echo form_dropdown('search_by',$data,$onchange);
Does it is right or wrong?
With this case, it still doesn't work.
How can I change this code?
Best regards.[/quote]
your form_dropdown function is still using 3 parameters.
Code:
echo form_dropdown('search_by',$data,$onchange, 'onChange="thisshouldwork()"');