Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > yui-ext how can i use event for tree?

Reply
Thread Tools

yui-ext how can i use event for tree?

 
 
hash
Guest
Posts: n/a
 
      04-05-2007
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

 
Reply With Quote
 
 
 
 
Ian Collins
Guest
Posts: n/a
 
      04-05-2007
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.
 
Reply With Quote
 
 
 
 
RobG
Guest
Posts: n/a
 
      04-05-2007
On Apr 5, 1:33 pm, "hash" <(E-Mail Removed)> 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

 
Reply With Quote
 
hash
Guest
Posts: n/a
 
      04-05-2007
On 5 Сав, 09:46, "RobG" <(E-Mail Removed)> wrote:
> On Apr 5, 1:33 pm, "hash" <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
can you use the onblur event with an ajax control Paul ASP .Net 0 10-28-2008 03:38 PM
Can't use datagrid pager with javascript onbeforeupdate event James ASP .Net Datagrid Control 1 03-17-2006 01:38 PM
Can you use DataSource property from event handler? Fred Dag ASP .Net 1 01-19-2006 01:13 AM
Only One Tkinter Entry can receive key event event in Linux RH8.0 wang xiaoyu Python 0 06-25-2003 04:44 AM



Advertisments