Hi there,
i’d like to join this topic, seems to me I got nearly the same issue on attaching a form to a window.
When a button on a toolbar is clicked, a window with a form in it pops up.
This is the IE Debug Error I get:
Object doesn't support this property or method: user, line 80, character 13
And this is the code my index.html
[code]
<script src="../../../includes/dhtmlsuite/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxGrid/codebase/ext/dhtmlxgrid_filter.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
<script src="../../../includes/phpconnector/codebase/connector.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxToolbar/codebase/dhtmlxcommon.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxToolbar/codebase/dhtmlxtoolbar.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxForm/codebase/dhtmlxcommon.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxForm/codebase/dhtmlxform.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxWindows/codebase/dhtmlxcontainer.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxWindows/codebase/dhtmlxcommon.js"></script>
<script src="../../../includes/dhtmlsuite/dhtmlxWindows/codebase/dhtmlxwindows.js"></script>
</head>
<body>
<div id="gridbox" style="width:*; height:90%;"></div>
<div id="toolbar"></div>
<script>
mygrid = new dhtmlXGridObject("gridbox");
mygrid.setImagePath("../../../includes/dhtmlsuite/dhtmlxGrid/codebase/imgs/");
mygrid.setHeader("ID,Benutzer,eMail,Name,Vorname,Passwort,Admin");
mygrid.setInitWidths("50,200,200,200,200,*,100");
mygrid.setColTypes("ed,ed,ed,ed,ed,ed,ed");
mygrid.attachHeader(",#connector_text_filter,#connector_text_filter");
mygrid.setColSorting("connector,connector,connector,connector,connector,connector,connector");
mygrid.setSkin("dhx_web");
mygrid.init();
mygrid.loadXML("index_table.php");
var dp = new dataProcessor("index_table.php");
dp.init(mygrid);
var toolbar = new dhtmlXToolbarObject("toolbar", "dhx_web");
toolbar.setIconsPath("../../../includes/dhtmlsuite/dhtmlxToolbar/codebase/imgs/");
toolbar.addButton("add", 1, "Add","new.gif", "new_dis.gif");
toolbar.addButton("delete", 2, "Delete","cut.gif", "cut_dis.gif");
toolbar.addButton("form", 3, "Formular","paste.gif", "paste_dis.gif");
toolbar.attachEvent("onClick",
function(id){
switch (id) {
case "add":
var newId = (new Date()).valueOf();
mygrid.addRow(newId,",Benutzer,eMail,Name,Vorname,Pass,0");
break;
case "delete":
var selId = mygrid.getSelectedId()
mygrid.deleteRow(selId);
break;
case "form":
var dhxWins = new dhtmlXWindows();
dhxWins.createWindow(1, 0,0, 300, 500);
dhxWins.setSkin("dhx_web");
dhxWins.window(1).setText("Neuen User anlegen");
dhxWins.window(1).denyResize();
dhxWins.window(1).button("park").disable();
dhxWins.window(1).button("park").hide();
dhxWins.window(1).centerOnScreen();
var myForm = dhxWins.window(1).attachForm();
myForm.loadStruct("index_form.xml");
break;
}
});
</script>
</body>
[/code]
thanks a lot…
Matt