Just a generic guess: foo is not in the scope of the onselect event
hander. alert means "window.alert" which always exists. "foo" means
"look up 'foo' here". I suggest you try
alert(foo)
and when that comes up "undefined"
try
alert(window.location)
and compare the value to the point where foo is defined.

(Maybe you can use tree.addEventListener('select', foo, true)
instead?)

jjb

On Jun 19, 10:50 am, APinter <[email protected]> wrote:
> Hello there,
>
> I've already asked for your help once, and got perfect help. So I hope
> you can help me again.
>
> I'm still working on the same project and want to react on a
> "onselect" event of my XUL-tree.
> This works fine, as long as I'm not trying to do any productive.
>
> The following works great:
> tree.setAttribute("onselect", "alert(currentIndex);");
>
> This one:
> tree.setAttribute("onselect", "foo(currentIndex);");
> and this one:
> tree.setAttribute("onselect",
> "Firebug.Cocoon3ProfilingModule.alertStuff(currentIndex);");
> do not work.
>
> "foo" is a custom method, which does nothing special at the moment. It
> just don't get called.
> Same for "alertStuff"
>
> You can find my Plugin in the "net" tab. When you open a request you
> should get another tab called "Cocoon 3 Profiling".
>
> I attached my XPI to provide you with as much information as
> possible.
> I hope you are able to help me again.
>
> Kind regards,
> Andreas
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to