Open a link when a node is clicked

Hi



I am used DHTMLX tree to display tree. Now I need to open a link on the left clcik of a node.

How to do it



Thanks

something similar to next must work

    tree.attachEvent(“onClick”,function(id){
       window.open(any_url_here)
    });

Try to:

- Add a userdata field called “url”

- Set a onClickHandler

40 tree.setOnClickHandler(onNodeSelect);//set function object to call on node select41 42 //see other available event handlers in API documentation43 function onNodeSelect(nodeId)44 {45 var link = tree.getUserData(nodeId,“url”);46 if (link != undefined)47 {48 49 top.frames[‘peMain’].location.href = link;50 }51 52 }53

And run perfectly.

Fins aviat…
Àlex Corretgé