Dear sirs
i don’t know where is my problem but i can’t attach a form to a layout cell. I tried like you described it here [url]http://www.dhtmlx.com/docs/products/dhtmlxForm/samples/05_integration/02_layout.html[/url] but it doesn’t work.
The Layout starts correctly but never shows my Form. Here is the source-code:
<?php
require_once('../../host/localhost.php');
$window = $_GET['a'];
$wonr = $_GET['b'];
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Auftrag abmelden</title>
<link rel="stylesheet" type="text/css" href="../dhtmlx/Layout/dhtmlxlayout.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Layout/skins/dhtmlxlayout_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Grid/codebase/dhtmlxgrid.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Grid/codebase/skins/dhtmlxgrid_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Grid/codebase/ext/dhtmlxgrid_pgn_bricks.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Toolbar/skins/dhtmlxtoolbar_dhx_skyblue.css">
<link rel="stylesheet" type="text/css" href="../dhtmlx/Form/skins/dhtmlxform_dhx_terrace.css">
<script src="../js/dispotool.js" type="text/javascript"></script>
<script src="../js/toolbar.js" charset="utf-8"></script>
<script src="../dhtmlx/Layout/dhtmlxcommon.js"></script>
<script src="../dhtmlx/Layout/dhtmlxlayout.js"></script>
<script src="../dhtmlx/Layout/dhtmlxcontainer.js"></script>
<script src="../dhtmlx/Grid/codebase/dhtmlxgrid.js"></script>
<script src="../dhtmlx/Grid/codebase/dhtmlxgridcell.js"></script>
<script src="../dhtmlx/Grid/codebase/ext/dhtmlxgrid_pgn.js"></script>
<script src="../dhtmlx/TreeGrid/codebase/dhtmlxtreegrid.js"></script>
<script src="../dhtmlx/Toolbar/dhtmlxcommon.js"></script>
<script src="../dhtmlx/Toolbar/dhtmlxtoolbar.js"></script>
<script src="../dhtmlx/Form/dhtmlxcommon.js"></script>
<script src="../dhtmlx/Form/dhtmlxform.js"></script>
<style>
html, body {width: 100%;height: 100%;margin: 0px;overflow: hidden;background-color:white;}
</style>
<script type="text/javascript">
window.onload = function(){
Layout = new Array();
dhtmlx.image_path='../dhtmlx/Layout/imgs/';
Layout[1] = new dhtmlXLayoutObject(document.body, '3U');
Layout[1].setEffect('collapse', true);
Layout[1].setEffect('resize', true);
Layout[1].setEffect('highlight', true);
Layout[1].cells('c').setText('Webtool Abmeldung');
Layout[1].setCollapsedText('c', 'Webtool Abmeldung');
Layout[1].cells('a').setWidth('800');
Layout[1].cells('b').setWidth('400');
Layout[1].cells('c').setWidth('1200');
Layout[1].cells('a').setHeight('470');
Layout[1].cells('b').setHeight('470');
Layout[1].cells('c').setHeight('180');
Layout[1].cells('a').fixSize(true, false);
Layout[1].cells('b').fixSize(true, false);
Layout[1].cells('c').fixSize(true, false);
Layout[1].cells('a').hideHeader();
// -----------------------------------------------------------------------------------
Layout[2] = Layout[1].cells('b').attachLayout('2E');
Layout[2].cells('a').setHeight('330');
Layout[2].cells('b').setHeight('140');
Layout[2].cells('a').hideHeader();
Layout[2].cells('b').hideHeader();
Layout[2].cells('b').attachURL('arbeiten.php?wonr_intern=<?php echo $wonr; ?>');
// -----------------------------------------------------------------------------------
var Toolbar = Layout[2].cells('a').attachToolbar();
Toolbar.setIconsPath("../images/icons/");
Toolbar.setSkin('dhx_skyblue');
Toolbar.addButton("send", 0, "Speichern", "save.gif", "save_dis.gif");
Toolbar.addButton("reset2", 1, "Zurücksetzen", "back.gif", "back_dis.gif");
Toolbar.addButton("close", 2, "Schliessen", "Exit.png", "Exit.png");
Toolbar.addSeparator("s1", 1);
Toolbar.addSeparator("s1", 3);
Toolbar.attachEvent("onClick", function(id) { Button_laden(id,1,1,'<?php echo $window; ?>',1); });
// -----------------------------------------------------------------------------------
//var TreeGrid = Layout[1].cells('a').attachGrid();
//TreeGrid.setImagePath('../dhtmlx/Grid/codebase/imgs/');
//TreeGrid.setIconsPath('../dhtmlx/Layout/imgs/');
//TreeGrid.enableTreeGridLines();
//TreeGrid.setDateFormat('%d.%m.%Y');
//TreeGrid.enableMultiselect(true);
//TreeGrid.enableAutoHeigth(true);
//TreeGrid.enableDragAndDrop(true);
//TreeGrid.enablePaging(true, 10, 5, "paging", true);
//TreeGrid.setPagingSkin("bricks");
//TreeGrid.init();
//TreeGrid.setSkin('dhx_skyblue');
//TreeGrid.loadXML('');
// -----------------------------------------------------------------------------------
// H E R E S T A R T S M Y P R O B L E M
var formdata = [
{type: "input",name: "field1_1",label: "Test:",disabled: true,value: "This is a test."}
];
var Form = Layout[2].cells('a').attachForm(formdata);
Form.setSkin("dhx_terrace");
}
</script>
</head>
<body>
</body>
</html>
Would be really nice if you can help me with this.
Best regards
Oliver Natschke