Categories | Question details Back To List | ||
tree, pass additional info from server Hi, I am using the pro version of dhtmlxtree, I am using the dataprocessor to send a link back to the tree thus: $url=$row['linkname']." [<a href='../../../../cmsadmin/editSections.php?sectionid=".$row['sectionid']."&action=modify' target='loader'>edit</a>]"; print("<item id='".$row['item_id']."' text=\"". htmlentities($url)."\" open=\"1\">"); So the tree appears like: linkname edit (where the edit part is a clickable link). However I wish to separate these, and not pass the actual link through the label since it is visible on edit label. Ideally I want on highlight of the item to activate the link, then clicking again will edit the linkname. I understand I can easily assign an event for onclick, however I need to pass back from the server this link info: $link=" <a href='../../../../cmsadmin/editSections.php?sectionid=".$row['sectionid']."&action=modify' target='loader'>edit</a>"; for example via print("<item id='".$row['item_id']."' text=\"". htmlentities($url)."\" open=\"1\" custom=\"".$link."\">"); and then tree.attachEvent("onClick",function(custom){ //blah blah }); In short, how can I pass this server generated link info back to the tree and access it invisibly. Hope this makes sense cheers Rob Answer posted by Alex (support) on Aug 28, 2009 01:45 Hello, you can try to use onEdit event handler with setItemText and getItemText to control editor content. For example: var text = ""; |