As far as I'm aware the order in which event handlers are triggered is
implementation-dependent (and I don't think IE is quite as reliable as
it seems, it's not always last-in-first-fired).  The only way you can
be sure of the order is to register only a single handler and have
that handler trigger other handlers in a known order (which is easy
enough).  Event.observe doesn't do that, it relies on the underlying
event implementation of the browser.

A little Googling on, say, "addEventListener order" or "attachEvent
order" (both without the quotes) will bring you lots of info about
event order peculiarities.

T.J. Crowder
tj / crowder software / com

On Sep 22, 9:36 am, vtsuper <[EMAIL PROTECTED]> wrote:
> Dear all
> I have try to use the element.fire to trigger 2 event
> var FCK = Class.create({
>   initialize:function(id){
>     document.observe('FCK:completed',
> this.func1.bindAsEventListener(this));
>     document.observe('FCK:completed',
> this.func2.bindAsEventListener(this));
>   },
>   func1:function(){
>     alert('1');
>   },
>   func2:function(){
>     alert('2');
>   }
> }
> in FF the sequence is prompt '1' and then '2'
> but in IE the sequence is prompt '2' and then '1'
> and how can I control the sequence??
> Regards
> Victor
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-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to