Problem with initializing Form

Hello

I have a really big problem with my form. I’m searching since 2 hours but can’t find the mistake why my Form does not initialize. Source always get en error on line:

Form = Layout.cells("b").attachForm(formData);

Here’s the complete code:

<!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=utf-8" />
      <title>Foto Upload Manager</title>
      <link href="../dhtmlx/Tabbar/dhtmlxtabbar.css" rel="stylesheet" type="text/css">
      <link href="../dhtmlx/Layout/dhtmlxlayout.css" rel="stylesheet" type="text/css">
      <link href="../dhtmlx/Layout/skins/dhtmlxlayout_dhx_web.css" rel="stylesheet" type="text/css">
      <link href="../dhtmlx/Form/skins/dhtmlxform_dhx_terrace.css" rel="stylesheet" type="text/css">
      <link href="../dhtmlx/Toolbar/skins/dhtmlxtoolbar_dhx_skyblue.css" rel="stylesheet" type="text/css">

      <script src="../js/toolbar.js"></script>
      <script src="../js/dispotool.js"></script>
      <script src="../dhtmlx/Tabbar/dhtmlxcommon.js"></script>
	   <script src="../dhtmlx/Tabbar/dhtmlxtabbar.js"></script>	
      <script src="../dhtmlx/Tabbar/dhtmlxcontainer.js"></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/Form/dhtmlxcommon.js"></script>
      <script src="../dhtmlx/Form/dhtmlxform.js"></script>
      <script src="../dhtmlx/Form/ext/dhtmlxform_item_upload.js"></script>
      <script src="../dhtmlx/Form/ext/swfobject.js"></script>  
      <script src="../dhtmlx/Toolbar/dhtmlxcommon.js"></script>
      <script src="../dhtmlx/Toolbar/dhtmlxtoolbar.js"></script> 
        
      <style>
	     html, body {width: 100%; height: 100%; margin: 0px; overflow: hidden; background-color:white;}
         .dhx_tabbar_zone_dark_blue .dhx_tabcontent_zone {border:0px none;}
		  table.dhtmlxLayoutPolyContainer_dhx_web td.dhtmlxLayoutPolySplitterVer {background-image: none !important;}
      </style>      
   </head>

   <body onload="doOnLoad();"> 
      <div id="loading" style="position:absolute; top:48%; left:44%; height:20px; widht:130px;"><img src="../dhtmlx/Grid/codebase/imgs/loading.gif" width="128" height="15" /></div>
      
	  <script type="text/javascript">
	     function doOnLoad() { 
		 
		    // ------------------------------------------------------------------------
		    //                               L A Y O U T
		    // ------------------------------------------------------------------------
		 
		    Layout = new dhtmlXLayoutObject(document.body, "2U", "dhx_web");
		    Layout.cells("b").setText("<span style='padding-left:130px'>Foto Upload</span>");
		    Layout.cells("b").setWidth(350);
		    Layout.cells("a").fixSize(true, true);
		    Layout.cells("b").fixSize(true, true);		 
   		 Layout.cells("a").hideHeader();
		 
		    // ------------------------------------------------------------------------
		    //                              U P L O A D
		    // ------------------------------------------------------------------------
		 
		    formData = [
		       {type: "upload",name: "field1_1",inputWidth: 380,autoStart: false,url: "../dhtmlx/Form/php/dhtmlxform_item_upload.php?objekt=<?php echo $row['objekt_intern']; ?>",_swfLogs: "enabled",swfPath: "../dhtmlx/Form/ext/uploader.swf",swfUrl: "../dhtmlx/Form/php/dhtmlxform_item_upload.php"}
		    ];
			
		    Form = Layout.cells("b").attachForm(formData);
		    Form.setSkin("dhx_terrace");
		 
		    // ------------------------------------------------------------------------
		    //                               T A B B A R
		    // ------------------------------------------------------------------------
		 
		    TabBar = Layout.cells("a").attachTabbar(); 
		    TabBar.setImagePath("../dhtmlx/Tabbar/imgs/");
		    TabBar.setSkin('dark_blue');
		    TabBar.setAlign("left");	
		    TabBar.addTab("t1", "Fotos für Objekt: <?php echo $row['objekt_intern']; ?>", "160px");
		    TabBar.addTab("t2", "Fotos aller Objekte", "130px");
		    TabBar.setTabActive("t1");
	     }
		 
      </script> 
   </body>
</html>

Thank you in advance for any help

Got my error. Problem was my order of initialization :open_mouth: