yui-ext how can i use event for tree?

H

hash

Helo
Does anybody know? It is a stupid question, but i am a newbie with it.
I tried to do like this

var tree = new Tree.TreePanel('tree-div', {
animate:true,
enableDD:true,
containerScroll: true
});

tree.click = function(node, e)
{
alert('test');
}

but no result, where am i wrong ? May be event has to be defined some
another way?
Thanks
 
I

Ian Collins

hash said:
Helo
Does anybody know? It is a stupid question, but i am a newbie with it.
I tried to do like this

var tree = new Tree.TreePanel('tree-div', {
animate:true,
enableDD:true,
containerScroll: true
});

tree.click = function(node, e)
{
alert('test');
}
You don't say what a Tree.TreePanel is. Assuming it is a DOM element,
you want

tree.onclick = function(node, e)
 
R

RobG

Helo
Does anybody know? It is a stupid question, but i am a newbie with it.

You shouldn't assume that readers can see or remember the subject when
reading the body of your post.

I tried to do like this

var tree = new Tree.TreePanel('tree-div', {
animate:true,
enableDD:true,
containerScroll: true
});

tree.click = function(node, e)
{
alert('test');
}

but no result, where am i wrong ? May be event has to be defined some
another way?

When discussing issues related to a particular library, you will
likely get much better help in a group dedicated to that topic. You
can access the Yahoo! User Interface Library group here:

<URL: http://tech.groups.yahoo.com/group/ydn-javascript/ >
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top