Re: how to add onchange javascript event to select field

52 views
Skip to first unread message

Rolando V.

unread,
Jul 19, 2012, 11:34:28 AM7/19/12
to rubyonra...@googlegroups.com
know if there is a way to know the id or the customer has selected??

--
Posted via http://www.ruby-forum.com/.

Max

unread,
Jul 20, 2012, 9:38:45 AM7/20/12
to rubyonra...@googlegroups.com

this will give you the selected text if you want it.  you can probably figure out what you need from this example.

var grain = $('select#id_of_my_element option:selected').text();
Reply all
Reply to author
Forward
0 new messages