Title: Can you hepl me online ? tree onClick is NULL Post by: zhangjian420 on November 26, 2014, 02:42:41 AM $(function(){
// 上级节点 $('#cc').combotree(); // 展示资源树 $("#tt").tree({ url:path+'/pdc_Resources/list', animate:true, lines:true, // 点击属性节点,表示要修改节点 onClick:function(node){ console.info(node); -----------------------------------------is null why????????? $("#res_content").children().remove(); // 删除先前load // 不是点击资源管理---进入修改 if(node.id != 0){ $("#res_content").load(path+"/pdc_Resources/edit/"+node.id); }else{ $("#res_content").load(path+"/pdc_Resources/add"); } }, onLoadSuccess:function(node,data){ $('#cc').combotree("loadData",data) } }); }); My English is so bad . EasyUI Vesion is 1.4.1 and I have add the easyui-1.4.1-patch.zip. but it doesn't work! Title: Re: Can you hepl me online ? tree onClick is NULL Post by: stworthy on November 26, 2014, 05:43:37 AM Please refer to the attached example 'tree_test.html'. It works fine.
Title: Re: Can you hepl me online ? tree onClick is NULL Post by: zhangjian420 on November 26, 2014, 07:37:01 AM Please refer to the attached example 'tree_test.html'. It works fine. Thank you very much!I change nothing,but change the version to 1.3.6 . It works well in my company code.I also change the attached example 'tree_test.html' . <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>Basic Tree - jQuery EasyUI Demo</title> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="http://www.jeasyui.com/easyui/themes/icon.css"> <script type="text/javascript" src="http://www.jeasyui.com/easyui/jquery.min.js"></script> <script type="text/javascript" src="jquery.easyui.min.js"></script> /**this file is 1.4.1 not 1.4.1.x ,it works well now. but It doesn't work in my company . Strange 。***/ <script type="text/javascript"> $(function(){ $('#tt').tree({ lines:true, animate:true, onClick:function(node){ console.log(node.text); } }) }) </script> </head> |