Hi,
when i create a form with editor’s and split into tabs, after on send (submit) form the values of editor’s don’t go on post but only in chrome, in firefox works fine.
I use dhtmlx 4.6.1 PRO and Chrome 49.0.2623.112 m
My code bellow.
var myLayout, myWins, myTabbar;
function doOnLoad() {
myLayout = new dhtmlXLayoutObject({
parent : document.body,
pattern : "1C"
});
myWins = new dhtmlXWindows({
image_path : "./imgs/",
skin : "dhx_blue"
});
if (!myWins.window("w1")) {
w1 = myWins.createWindow("w1", 150, 10, 900, 600);
w1.setText("Test");
w1.centerOnScreen();
w1.denyResize();
w1.denyMove();
w1.button("park").disable();
w1.setModal(true);
w1.progressOn();
var toolBar = w1.attachToolbar();
toolBar.addButton('back', 0, "Voltar", "back.png");
toolBar.addSpacer('back');
toolBar.addButton('save', 2, "Guardar", "save2.png");
toolBar.attachEvent("onClick", function (id) {
switch (id) {
case 'save':
w1.progressOn();
myForm.send("send_form.php", "post", function (loader, response) {
w1.progressOff();
});
break;
default:
break;
}
});
myTabbar = w1.attachTabbar({
align : "left",
mode : "top",
tabs : [
{
id : "a1",
text : "TAB 1",
width : 90,
active : true
}, {
id : "a2",
text : "TAB 2",
width : 100
}, {
id : "a3",
text : "TAB 3",
width : 100
}, {
id : "a4",
text : "TAB 4",
width : 100
}, {
id : "a5",
text : "TAB 5",
width : 100
}
]
});
myTabbar.setArrowsMode("auto");
myTabbar.tabs("a1").attachHTMLString('<div id="dhxForm" />');
myForm = new dhtmlXForm("dhxForm");
myForm.loadStruct("./form.php");
//myForm.enableLiveValidation(true);
myForm.attachEvent("onXLE", function () {
myTabbar.tabs("a2").attachObject("tab2");
myTabbar.tabs("a3").attachObject("tab3");
myTabbar.tabs("a4").attachObject("tab4");
myTabbar.tabs("a5").attachObject("tab5");
//************ SET EDITOR'S READONLY *******************
myForm.getEditor("descricao_mercadoria")._prepareContent(true);
myForm.getEditor("obs")._prepareContent(true);
myForm.getEditor("obs2")._prepareContent(true);
myForm.getEditor("obs3")._prepareContent(true);
w1.progressOff();
});
}
Example in attachmment.
form_split_tabs_send.zip (5.75 KB)