Categories | Question details Back To List | ||
dhtmlXGridObject is not defined I'm getting an error "dhtmlXGridObject is not defined." I added the dhtmlXGrid.js in order the dhtmlXGridObject be visible in my page. See the code as shown below. Help, suggestions highly appreciated. Thanks, Ricardo Carvalho <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Untitled Page</title> <link rel="STYLESHEET" type="text/css" href="../css/dhtmlXGrid.css"/> <script type="text/javascript" src="../js/dhtmlXCommon.js"></script> <script type="text/javascript" src="../js/dhtmlXGrid.js"></script> <script type="text/javascript" src="../js/dhtmlXGridCell.js"></script> <script type="text/javascript"> function doOnLoad() { mygrid = new dhtmlXGridObject('gridbox'); mygrid.setImagePath("../imgs/"); mygrid.setHeader("Column A, Column B"); mygrid.setInitWidths("100,250") mygrid.setColAlign("right,left") mygrid.setColTypes("ro,ed"); mygrid.setColSorting("int,str"); mygrid.enableMultiselect(true) mygrid.init(); mygrid.loadXML("../grid.xml"); } </script> </head> <body onload="doOnLoad()"> <div id="gridbox" style="width:100%;height:250px;background-color:white;overflow:hidden"></div> </body> </html> Answer posted on Oct 11, 2007 11:29 Such error can occur only if js file not loaded - please check that path correctly point to file and name is exact the same ( based on used server - case of file name may be important ) |