EasyUI Forum
September 14, 2025, 06:27:54 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Link on Tree  (Read 9549 times)
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« on: June 26, 2014, 06:14:49 PM »

Help me please,

How to create a link on an easyui tree based on JSON that populate the tree?

why there s no demo for important feature like this?....


thanks in advance
« Last Edit: June 26, 2014, 08:47:47 PM by aswzen » Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: June 26, 2014, 06:32:55 PM »

Please use the 'formatter' function to convert the node to a link.
Code:
$('#tt').tree({
formatter:function(node){
return '<a href="..." target="_blank">'+node.text+'</a>';
}
})
Logged
aswzen
Sr. Member
****
Posts: 287


Indonesian

aswzen
View Profile WWW Email
« Reply #2 on: July 16, 2014, 08:02:26 PM »

I just populated tree using json..and the tree just have 40 item..
Should i format all of them (with conditional) Huh

Logged

Regards,
Sigit

- Indonesian jEasyUI Facebook page : https://www.facebook.com/groups/jeasyuiid/
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!