Hi,
I want to display a tree with loadJSON method, it works with IE v9, chrome and mozilla, but fail to load with IE v8, and older versions. Is there an issue to fix the bug ?
Thanks.
Hi,
I want to display a tree with loadJSON method, it works with IE v9, chrome and mozilla, but fail to load with IE v8, and older versions. Is there an issue to fix the bug ?
Thanks.
Can’t reproduce your issue
Check my sample in your system - i tried it in IE8
tree_json.rar (43.7 KB)
here is my issue :
whan I load my page with IE v8, debug mode ask me if I want to use it.
from IE debugger, there is a null value of “this.d” in dhtmlxtree_json.js line 5:
jsonPointer.prototype={
text:function(){ var afff=function(n){ var p=[]; for(var i=0; i<n.length; i++) p.push( {"+sfff(n[i])+"}"); return p.join(","); }; var sfff=function(n){ var p=[]; for (var a in n) if (typeof(n[a])=="object"){ if (a.length) p.push('"'+a+'":['+afff(n[a])+"]"); else p.push('"'+a+'":{'+sfff(n[a])+"}"); }else p.push('"'+a+'":"'+n[a]+'"'); return p.join(","); }; return "{"+sfff(this.d)+"}"; },
get:function(name){return this.d[name]; },
exists:function(){return !!this.d },
content:function(){return this.d.content; },
each:function(name,f,t){ var a=this.d[name]; var c=new jsonPointer(); if (a) for (var i=0; i<a.length; i++) { c.d=a[i]; f.apply(t,[c,i]); } },
get_all:function(){ return this.d; },
sub:function(name){ return new jsonPointer(this.d[name],this.d) },
sub_exists:function(name){ return !!this.d[name]; },
each_x:function(name,rule,f,t,i){ var a=this.d[name]; var c=new jsonPointer(0,this.d); if (a) for (i=i||0; i<a.length; i++) if (a[i][rule]) { c.d=a[i]; if(f.apply(t,[c,i])==-1) return; } },
up:function(name){ return new jsonPointer(this.dp,this.d); },
set:function(name,val){ this.d[name]=val; },
clone:function(name){ return new jsonPointer(this.d,this.dp); },
through:function(name,rule,v,f,t){ var a=this.d[name]; if (a.length) for (var i=0; i<a.length; i++) { if (a[i][rule]!=null && a[i][rule]!="" && (!v || a[i][rule]==v )) {
var c=new jsonPointer(a[i],this.d); f.apply(t,[c,i]); } var w=this.d; this.d=a[i];
if (this.sub_exists(name)) this.through(name,rule,v,f,t); this.d=w; } }
}
Here is my tree.json :
{id:"0",item:[
{id:"1_1",text:"test100000"},
{id:"1_2",text:"test10000"},
{id:"1_3",text:"test1000"},
{id:"1_4",text:"test100"},
{id:"1_5",text:"test10""}
]}