It's not a secret anymore!*
The moose likes HTML, CSS and JavaScript and the fly likes (dojo tree) how can I bind an event with the text? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "(dojo tree) how can I bind an event with the text?" Watch "(dojo tree) how can I bind an event with the text?" New topic
Author

(dojo tree) how can I bind an event with the text?

ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Anyone tried dojo toolkit for tree component? I have a small doubt in that.



Here, value of the title attributes are displayed in the tree as text i.e. aJavaVariable is 'dad' and bJavaVariable is 'son' then son will be under dad...

Now I want to associate an onClick event on the text (when I click on say 'son' an alert should pop up), how to do that?

How can I bind (associate) an event with the text?

I tried putting text inside div and then putting div against title through javascript variable but that doesn't work.

Thanks.
 
jQuery in Action, 2nd edition
 
subject: (dojo tree) how can I bind an event with the text?