Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by RoyB-new user on Aug 17, 2009 10:43
open dhtmlx forum
Invalid Argument

I used the 2 pre-comoiled files from std_full.zip and placed them in codebase. Here is the code I created from the dhtmlxGrid step-by-step guide by cut-n-paste into a file. i still get the error "Line 1444 , Character 7381, Invalid Argument" I do get the blue boxes on the page, but nothing else. Can you send me the complete file for this example?

<html>
<head>
<title>AJAX Application</title>
<script src="codebase/dhtmlx.js"></script>
<link rel="STYLESHEET" type="text/css" href="codebase/dhtmlx.css">
</head>

<script>
var myLayout, myTree, myGrid, myFolders, myMenu, myToolbar
var gl_view_type = "icons"; //icons,dlist,tiles ...
var gl_view_bg = ""; //which component is used for directory content view - grid or folders, empty from start

function doOnLoad(){
myLayoutTop = new dhtmlXLayoutObject(document.body, "2U");
myLayoutIns = new dhtmlXLayoutObject(myLayoutTop.cells("a"), "2U");
myLayout = new dhtmlXLayoutObject(document.body, "2U", "dhx_black");
myLayout.cells("a").setText("Folders");
myLayout.cells("b").hideHeader();
myMenu = myLayout.attachMenu();
myMenu.setImagePath("codebase/imgs/dhx_blue");
myMenu.loadXML("xml/fileExplorerMenu.xml");
myToolbar = myLayout.attachToolbar();
myToolbar.setIconPath("images/toolbar/");
myToolbar.loadXML("xml/fileExplorerToolbar.xml");
myTree = myLayout.cells("a").attachTree("0");
myTree.setImagePath("codebase/imgs/");
myTree.setXMLAutoLoading("xml/directoryTree.php");
myTree.loadXML("xml/directoryTree.php");
}



function showOtherViews(dir){
//create Folders in layout
myFolders = myLayout.cells("b").attachFolders();
//confugure settings
myFolders.enableSelection(true);
myFolders.setItemTagName("row");
//change type of items depending on required
if(gl_view_type=="icons"){
myFolders.setItemType("js_generic",rendFuncIcons);
myFolders.setCSSBaseName("ficon");
}else if(gl_view_type=="tiles"){
myFolders.setItemType("js_generic",rendFuncTiles);
myFolders.setCSSBaseName("ftiles");
}
myFolders.loadXML("xml/directoryContent.php?dir="+dir);
}

function showDirContent(dir){
if(gl_view_type=="dlist"){
showDList(dir);
}else{
showOtherViews(dir);
}
}





</script>

<body onload="doOnLoad()" style="width:100%; height:100%; margin:0px; overflow:hidden;">

</body>
</html>
Answer posted by Alex (support) on Aug 18, 2009 02:38

There is the issue in your code. Why do you call "new dhtmlXLayoutObject(document.body.." twice ? The dhtmlx.css from std_full.zip contains classes only for dhx_blue skin. So, please use dhx_blue skin instead of dhx_black

/*myLayoutTop = new dhtmlXLayoutObject(document.body, "2U"); 

myLayoutIns = new dhtmlXLayoutObject(myLayoutTop.cells("a"), "2U"); */

myLayout = new dhtmlXLayoutObject(document.body, "2U", "dhx_blue");