On Nov 17, 2010, at 1:16 PM, Ryan Gahl wrote:

this is not an IE6 issue. You're doing it wrong. First of all, the event to listen for on selects is not "click", but "change" (as in, you don't wire listeners to the option elements).

In the onchange event for the select element, you then grab the value of the selected item via something like:

var myselect = Event.element(e); // e === the select
var val = myselect.options[myselect.selectedIndex].value;

note: pseudocode but you should be able to get it from there.

If you're listening to that event using Prototype, then inside your listener function, you can get the current value of the element with $F(this). That hops through all the hoops of element.options[element.options.selectedOption] and whatnot.

Walter


--
You received this message because you are subscribed to the Google Groups "Prototype 
& script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to