yui-ext how can i use event for tree?

Discussion in 'Javascript' started by hash, Apr 5, 2007.

  1. hash

    hash Guest

    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
    hash, Apr 5, 2007
    #1
    1. Advertising

  2. hash

    Ian Collins Guest

    hash wrote:
    > 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)

    --
    Ian Collins.
    Ian Collins, Apr 5, 2007
    #2
    1. Advertising

  3. hash

    RobG Guest

    On Apr 5, 1:33 pm, "hash" <> wrote:
    > 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/ >


    --
    Rob
    RobG, Apr 5, 2007
    #3
  4. hash

    hash Guest

    On 5 ÁÐÒ, 09:46, "RobG" <> wrote:
    > On Apr 5, 1:33 pm, "hash" <> wrote:
    >
    > > 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/>
    >
    > --
    > Rob


    Thanks, Rob
    hash, Apr 5, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stub

    B tree, B+ tree and B* tree

    Stub, Nov 12, 2003, in forum: C Programming
    Replies:
    3
    Views:
    10,109
  2. Jindal, Pankaj

    ['ext.IsDOMString', 'ext.SplitQName']

    Jindal, Pankaj, Dec 22, 2004, in forum: Python
    Replies:
    0
    Views:
    314
    Jindal, Pankaj
    Dec 22, 2004
  3. Replies:
    11
    Views:
    599
  4. hedgehog
    Replies:
    1
    Views:
    142
    hedgehog
    Apr 6, 2007
  5. shotokan99

    help on yui tree menu

    shotokan99, Aug 29, 2007, in forum: Javascript
    Replies:
    4
    Views:
    108
    shotokan99
    Aug 30, 2007
Loading...

Share This Page