а

TypeError: dhtmlx.url is not a function


#1

Hi,
I am currently evaluating the component in order to productize it however getting error TypeError: dhtmlx.url is not a function on tree. The initial static node ios getting displayed proper;ly , the issue is around dynamic loading.
Here are the sample code
JS include sequence

dhtmlxcommon.js
dhtmlxlayout.js
dhtmlxContainer.js
dhtmlxtree.js
dhtmlx.js
dhtmlxtree_xw.js
dhtmlxtree_json.js
dhtmlxmenu.js
dhtmlxmenu_ext.js

Execution

[code]dhxLayout = new dhtmlXLayoutObject(“treeboxbox_tree”, “1C”);
dhxTree = dhxLayout.cells(“a”).attachTree();
dhxLayout.cells(“a”).setText(“Organizational Units”);
dhxLayout.cells(“a”).hideHeader();

    var menuData = {parent: "objMenu", context:true, icon_path:"BuiltIn/Common/Images/", items: [{ id: "refresh", text: "<%=sRefreshMenuCaption%>", img: "reload.gif"}]} ;
	dhxContextMenu = new dhtmlXMenuObject(menuData);
	dhxContextMenu.attachEvent("onClick", onMenuClick);
    dhxTree.enableContextMenu(dhxContextMenu);            

	dhxTree.setSkin('BuiltIn/Common/Images/csh_dhx_skyblue');
	dhxTree.setImagePath("BuiltIn/Common/Images/csh_winstyle/");
	dhxTree.setDataMode("json");
	dhxTree.setEscapingMode("utf8")
	dhxTree.enableKeyboardNavigation(true);
	dhxTree.setXMLAutoLoading("BuiltIn/Common/Scripts/Dhtmlx/Tree/GetTreeJSON.asp");[/code]

The issue is around

this.load(c+dhtmlx.url(c)+"uid="+a+"&id="+this._escape(e))

just for verification if i update this code to in dhtmlx.js

this.load(c+"uid="+a+"&id="+this._escape(e))

everything seems to be working perfectly.

Any clue?

Thanks in advance.


#2

You need to load your data using the load() method initially.
Here you can find an example:
dhtmlx.com/docs/products/dhtmlx … ading.html
Also, please, try to exclude all the js files except the “dhtmlx.js” file.
It is not recommended to use the files from the “codebase” directory together with the files from the “sources” directory.


#3

Its pretty huge code base, in come part I do have a snippet

dhxTree.loadJSON("BuiltIn/Common/Scripts/Dhtmlx/Tree/GetTreeJSON.asp?id=0", OnTreeLoad);

still I have the issue.


#4

Could you please, share a demo link or provide a complete demo, where the problem can be reconstructed locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxi … pport.html


#5

I lost the environment. I will upload once its recreated. Thanks for your assistance.