Hi
You need to correct your doOnLoad function a little:
[code]function doOnLoad() {
formData = [
{type: “block”,id:“formData_1”,list:[
{type: “settings”,position: “label-left”,labelWidth: 100,inputWidth: 120},
{type: “fieldset”,label: “Type1”,inputWidth: “auto”,list: [
{type: “input”,label: “Voy”,name: “voy”,value: “”,inputWidth: “50”}
]
}]},
{type: “block”,id:“formData_2”,list:[
{type: “settings”,position: “label-left”,labelWidth: 75,inputWidth: 120},
{type: “fieldset”,label: “Type2”,inputWidth: “auto”,list: [
{type: “input”,inputWidth: “250”,name: “commod”,label: “Commod”,value: “”}
]}
]},
{type: “block”,id:“formData_3”,list:[
{type: “settings”, position: “label-left”,labelWidth: 75,inputWidth: 120},
{type: “block”,inputWidth: “auto”,list: [
{type: “button”,value: “Save”, name: “save_3”}
]}
]}
];
dhxTabbar = new dhtmlXTabBar("tabbar","top");
dhxTabbar.setImagePath("../../dhtmlx_pro_full/imgs/");
dhxTabbar.setMargin(-1);
dhxTabbar.setSkin("dhx_skyblue");
dhxTabbar.addTab("b1", "Type1", "100px");
dhxTabbar.addTab("b2", "Type2", "100px");
dhxTabbar.addTab("b3", "Type3", "100px");
dhxTabbar.setTabActive("b1");
form = dhxTabbar.cells("b1").attachForm(formData);
dhxTabbar.cells("b2").attachObject("formData_2");
dhxTabbar.cells("b3").attachObject("formData_3");
form.bind(bookings);
var dp = new dataProcessor("data.php");
dp.init(form);
form.attachEvent("onButtonClick", function(id) {
if (id == "save_3") {
bookings.saveBatch(function(){
form.save();
})
}
});
}[/code]
There is a sample hoe to split form to the tabs correctly:
dhtmlx.com/docs/products/dht … split.html