I’m using Ruby on rails.
Does somebody know how can I insert a javascript function on a combobox?
My combobox takes info from my database (only three rows), I have this:
<%=select("post", "user_id", @usertype.collect {|p| [p.type_user]},{:include_blank => 'None'}) %>
I want the equivalent to:
select id="post_user_id" name="post[user_id]" onChange="showUsersFromThatType()">
option value="">None</option>
option value="boss">boss</option>
option value="student">student</option>
option value="technicial">technicial</option></select>
Thanks!
@usertypeis a collection and has variable\methodtype_user