Hi Darya
I’m running dhtmlxSuite_v412_std. I’ve tried a few things:
The following code from your samples/documentation seems to work putting the blocks into the 3 tabs.
[code]hla.OpenSettings = function() {
dhxWins = new dhtmlXWindows();
w1 = dhxWins.createWindow("w1", 20, 30, 400, 280);
w1.setText("Settings");
//
myTabbar = w1.attachTabbar({
tabs: [
{id: "a1", label: "Tab 1", active: true},
{id: "a2", label: "Tab 2"},
{id: "a3", label: "Tab 3"}
]
});
formData = [
{type: "settings", position: "label-left", labelWidth: 145, inputWidth: 150},
{type: "block", inputWidth: "auto", list:[
{type: "input", offsetTop: 14, label: "Login", value: "p_rossi"},
{type: "password", label: "Password", value: "123"},
{type: "checkbox", label: "Remember me", checked: true}
]},
{type: "block", inputWidth: "auto", id: "tab2", list:[
{type: "input", offsetTop: 14, label: "Full Name", value: "Patricia D. Rossi"},
{type: "input", label: "E-mail Address", value: "p_rossi@example.com"},
{type: "input", label: "Login", value: "p_rossi"},
{type: "password", label: "Password", value: "123"},
{type: "password", label: "Confirm Password", value: "123"},
{type: "checkbox", label: "Subscribe on news"}
]},
{type: "block", inputWidth: "auto", id: "tab3", position: "absolute", list:[
{type: "select", offsetTop: 14, label: "Account type", options:[
{text: "Admin", value: "admin"},
{text: "Organiser", value: "org"},
{text: "Power User", value: "poweruser"},
{text: "User", value: "user"}
]},
{type: "checkbox", label: "Show logs window"}
]}
];
myForm = myTabbar.cells("a1").attachForm(formData);
//myForm.loadStruct("data/frmSettings.xml");
myTabbar.cells("a2").attachObject("tab2");
myTabbar.cells("a3").attachObject("tab3");
};[/code]
When I then try and use my previously attached XML it puts everything into tab 1.
[code]hla.OpenSettings = function() {
dhxWins = new dhtmlXWindows();
w1 = dhxWins.createWindow("w1", 20, 30, 400, 280);
w1.setText("Settings");
//
myTabbar = w1.attachTabbar({
tabs: [
{id: "a1", label: "Tab 1", active: true},
{id: "a2", label: "Tab 2"},
{id: "a3", label: "Tab 3"}
]
});
myForm = myTabbar.cells("a1").attachForm();
myForm.loadStruct("data/frmSettings.xml");
myTabbar.cells("a2").attachObject("tab2");
myTabbar.cells("a3").attachObject("tab3");
};[/code]
Are you sure my XML is formatted OK?
Does someone have a sample XML that includes blocks and fieldsets
Thanks again for your time.