Hi Anjanesh,
I use a simple bypass to this limitation:
when observing an event, if it's a native event, I create a custom
event "native:click" that reference the same call back to the original
click observer.
So firing this "native:click" event, does the job.
--
david
On 29 jan, 16:35, Peter De Berdt <
peter.de.be...@pandora.be> wrote:
> On 29 Jan 2009, at 16:18, Anjanesh wrote:
>
> > I need to trigger a 'change' event for a 'select' element.
>
> > alert($($(elem).parentNode)); // shows [Object HTMLSelectElement]
> > $($(elem).parentNode).fire('change'); // How do I indicate which
> > option value to change to ?
>
> > But the fire() doesnt work. But no JS errors either.
>
> Fromhttp://
prototypejs.org/api/element/fire:
> Element#fire does not support firing native events. All custom event
> names must be namespaced (using a colon). This is to avoid custom
> event names conflicting with non-standard native DOM events such as
> mousewheel and DOMMouseScroll.
>
> What you want to to, is set the selectedIndex value from the <select>
> element as is documented athttp://
www.w3schools.com/htmldom/dom_obj_select.asp