Hi,
I’ve got 3 kind of DHTMLX window in my page (w2,w3,w4) with diferents size and functions for each windows.
It works well when I open/close the same kind of window but for example if I open w2 and close it and after open a w3 or w4 I have a blank page…
I use this :
function openInWindow(url) {
if (!dhxWins) dhxWins = new dhtmlXWindows();
if (!dhxWins.window(“w2”)) {
dhxWins.enableAutoViewport(false);
dhxWins.setSkin(“dhx_web”);
dhxWins.attachViewportTo(“winVP”);
dhxWins.setImagePath(“tools/dhtmlxwindows/codebase/imgs/”);
var w2 = dhxWins.createWindow(“w2”, 20, 30, 800, 300);
w2.setModal(true);
w2.setText(" ");
w2.center();
w2.clearIcon();
w2.denyResize();
w2.button(“minmax1”).hide();
w2.button(“park”).hide();
w2.denyMove();
w2.denyPark();
w2.attachEvent(“onClose”, function(win){
if (win.getId() == “w2”) {
LoadDiv(‘force’);
win.setModal(false);
win.hide();
}
});
} else {
var w2 = dhxWins.window(“w2”);
//w2.setSkin(“dhx_web”);
w2.setModal(true);
w2.show();
}
w2.attachURL(url);
};
function openInFullText(obj,txtorigin,txtnew) {
if (!dhxWins) dhxWins = new dhtmlXWindows();
if (!dhxWins.window(“w3”)) {
dhxWins.enableAutoViewport(false);
dhxWins.setSkin(“dhx_web”);
dhxWins.attachViewportTo(“winVP”);
dhxWins.setImagePath(“tools/dhtmlxwindows/codebase/imgs/”);
var w3 = dhxWins.createWindow(“w3”, 20, 30, 900, 700);
w3.setModal(true);
w3.setText(" ");
w3.center();
w3.clearIcon();
w3.denyResize();
w3.button(“minmax1”).hide();
w3.button(“park”).hide();
w3.denyMove();
w3.denyPark();
w3.attachEvent(“onClose”, function(win){
if (win.getId() == “w3”) {
win.setModal(false);
win.hide();
}
});
} else {
var w3 = dhxWins.window(“w3”);
w3.setModal(true);
w3.show();
}
document.getElementById(txtnew).value=(document.getElementById(txtorigin).value);
w3.attachObject(obj);
};
function replaceText(txtorigin,txtnew){
document.getElementById(txtorigin).value=(document.getElementById(txtnew).value);
dhxWins.window(“w3”).close();
};
function openFlux(url) {
if (!dhxWins) dhxWins = new dhtmlXWindows();
if (!dhxWins.window(“w4”)) {
dhxWins.enableAutoViewport(false);
dhxWins.setSkin(“dhx_web”);
dhxWins.attachViewportTo(“winVP”);
dhxWins.setImagePath(“tools/dhtmlxwindows/codebase/imgs/”);
var w4 = dhxWins.createWindow(“w4”, 10, 10, 315, 750);
w4.setModal(true);
w4.setText(" ");
w4.center();
w4.clearIcon();
w4.denyResize();
w4.button(“minmax1”).hide();
w4.button(“park”).hide();
w4.denyMove();
w4.denyPark();
w4.attachEvent(“onClose”, function(win){
if (win.getId() == “w4”) {
win.setModal(false);
win.hide();
}
});
} else {
var w4 = dhxWins.window(“w4”);
w4.setModal(true);
w4.show();
}
w4.attachURL(url);
};
Thanks for your help.