
dynatree - issue #494
I am unable to use dynatree in js files, works fine in php files
var jsoncat = jsoncat.replace(/\%/g,'"').trim();
var jsoncat = '{"data":['+JSON.stringify(jsoncat)+']}';
var jsonObj = JSON.parse(jsoncat);
cWindowShow('jax.call("community","admin,groups,ajaxEditGroup", ' + groupId + ');', 'Editing Group' , 550 , 450);
var delay=1000;//1 seconds
alert(typeof(jsonObj));
alert(jsonObj.data);
setTimeout(function(){
var treeData = [jsonObj.data];
// --- Initialize sample trees
jQuery('#tree1').dynatree({
checkbox: true,
// Override class name for checkbox icon:
classNames: {checkbox: "dynatree-radio"},
selectMode: 3,
children: treeData,
onActivate: function(node) {
jQuery('#echoActive1').text(node.data.key);
},
onSelect: function(select, node) {
// Display list of selected nodes
jQuery("#categoryid").val(node.data.key);
},
onDblClick: function(node, event) {
node.toggleSelect();
},
onKeydown: function(node, event) {
if( event.which == 32 ) {
node.toggleSelect();
return false;
}
},
});
},delay);
this is my code. Thank You!
Comment #1
Posted on Feb 12, 2015 by Happy BearThis is not enough information to reproduce or analyze a problem, sorry. Please give details, add a stack trace or set up a jsFiddle, thanks
Status: Invalid
Labels:
Type-Defect
Priority-Medium