Re: multiple Event.observe [prototype]

Gareth Evans
Wed, 14 Nov 2007 20:04:24 -0000

what does this.updateSearchResults1 do?



On 11/15/07, Mescal <rudemescal-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:
>
>
> Hi,
> I have 3 chained select (not sequential) and I tried to create 3
> observers in order to change select contents
> dynamically in this way:
>
> [code]
>
Event.observe(document.getElementById(this.searchItem1),''change'',
> this.updateSearchResults1.bindAsEventListener(this));
>
>
Event.observe(document.getElementById(this.searchItem2),''change'',
> this.updateSearchResults2.bindAsEventListener(this));
>
Event.observe(document.getElementById(this.searchItem3),''change'',
> this.updateSearchResults3.bindAsEventListener(this));
> [/code]
>
> When I change the value of 1 of the 3 select the code in the function
> updateSearchResultsX is executed and in continues working everytime i
> change the value of the same select.
>
> When I try to change 1 of the other select values(after the first
> change) the observer doesn''t seem to work infact nothing happens.
>
> Can you please help me????
>
>
> >
>