The following code block produces the error, “Object doesn’t support property or method replace”. I have a screen shot of the IE11 debugger as well. In chrome, I see a single node with a file icon and the word Test.
NOTE: all JS and CSS files are in the same directory as the html
<html>
<head>
<link rel="stylesheet" type="text/css" href="dhtmlxtree.css">
<script src="dhtmlxcommon.js"></script>
<script src="dhtmlxtree.js"></script>
</head>
<body>
<div id="treeboxbox_tree" style="width:250px; height:600px;"></div>
<script>
var tree = new dhtmlXTreeObject("treeboxbox_tree", "100%", "100%", 0);
tree.setImagePath("imgs/");
var xml = '<?xml version="1.0" encoding="iso-8859-1" ?><tree id="0"><item text="Test" id="1"></item></tree>';
tree.loadXMLString(xml);
</script>
</body>
</html>
The tree loads with the full suite JS file you provided but it has a problem with the width of the control. I set the dimensions to 300x300 but when it loads there is a long scrollbar which is cut off on the horizontal axis. See the screen shot. Are we going to see a patched version of just the tree JS file because I do not want to load a 1.2MB suite JS file on this page?
Attached is a zip file with the demo folder. In the folder there are two HTML files. The one labeled “index” is the working code using the full suite JS file but shows the width issues. The “index_not_working” file is the original Tree only code which errors in IE11. dhtmlxtree_demo.zip (487 KB)
Your tree container is 250px and tree width is 300px - it provokes the scroll appearance
About “not working” sample: you don’t need to use separated files now in 4.1.2 version.
We recommend to use loading approach provided in this online sample: dhtmlx.com/docs/products/dhtmlxT … o_api.html
The sample you link to does not fix the “not_working” file. There is no working implementation just using the dhtmlxtree.js file in IE11. All the examples use only the dhtmlx.js suite file. I do not want to use the entire 1MB JS file for a simple page. That would significantly hurt load times on slower connections compared to the tree file alone at 200KB.
I was able to switch my code to the newer creation method in the link you provided however it allows me to see the ends of the scroll bar properly but still doesn’t explain why there even is one present. My width is set to 100% and there is still a scroll bar for a single node with the word Test. I saw another post about it always using 99999 or something for the scroll bar length in IE11. I assume this is the same bug.
The issue is still the same as the screen shot of the working tree but It has the scrollbar. Even when the width of the control is set to 100% width there is a scroll bar that appears which seems to go out for a long ways. In another post it postulated that it was getting 99999 for the width of the screen when using IE11 which means the method used to determine and set the width of the control is not working properly.