Sure... but my point was simply that dude was doing it wrong listening for
click events on option elements, which is why he's having the issue he's
having.


---
Warm Regards,
Ryan Gahl


On Wed, Nov 17, 2010 at 2:38 PM, Walter Lee Davis <wa...@wdstudio.com>wrote:

>
> 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<prototype-scriptaculous%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/prototype-scriptaculous?hl=en.
>
>

-- 
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