Hi,
I’ve some trouble with windowsObject. I’ve a window with an object Form attached. The window appear when I select an option in my contextual menu.
On the first load, there is no problem : the window appear with the form.
When I close the window and select again my option to show the window it does’nt work.
Next I realize that there is a trouble with my form : “Cannot read property ‘style’ of null” in my form code (on first line).
Here is my code :
f0 = new dhtmlXForm("form",[
{type: "settings",position: "label-left",labelWidth: 120,labelAlign:"right",inputWidth:"auto"},
{type: "fieldset", name: "general", label: "Général",labelAlign:"left", inputWidth: "auto", list: [
{type:"input", name: "name", label:"Entite : ",value:"test",readonly:true},
{type:"input", name: "owner", label:"Propriétaire : ",value:"Administrateur",readonly:true},
{type:"input", name: "date_creation", label:"Créé(e) le : ",value:"07/02/2012",readonly:true},
{type:"input", name: "TE", label:"Emplacement : ",value:"Contacts",readonly:true},
{type:"input", name: "type", label:"Type : ",value:"Entité ",readonly:true},
{type:"input", name: "child", label:"Nombre d\'enfants : ",value:"0",readonly:true}
]}
]);
var dhxWins = new dhtmlXWindows();
dhxWins.createWindow("w1",0,0,370,250);
dhxWins.setImagePath("../../Resources/theme/img/dhtmlx/windows/");
dhxWins.setSkin("dhx_skyblue");
dhxWins.window("w1").center();
dhxWins.window("w1").setText("Propriété de l'Entité ");
dhxWins.window("w1").setModal(true);
dhxWins.window("w1").attachObject("form");
dhxWins.attachEvent("onClose", function(win){
dhxWins.unload();
f0.unload();
f0 = null;
});
If someone knows how to solve my issue ?
Thanks.