Hi everyone
I nedd a little help,
I need to place a little anounce when a user visit my website, and I want to use a Dhtmlxwindow, with a dinamic content from a external HTML (marketing), and I want if somebody have any Idea about how to do it.
Thanks
charlygarcia
Hello,
you can try to use the following approach to load different urls to the same window:
var dhxWins;
function loadInWindow(url) {
if (!dhxWins) dhxWins = new dhtmlXWindows();
if (!dhxWins.window(“w1”)) {
var w1 = dhxWins.createWindow(“w1”, x, y, w, h);
w1.attachEvent(“onClose”, function(w){
if (win.getId() == “w1”) {
win.hide();
}
});
} else {
var w1 = dhxWins.window(“w1”);
w1.show();
}
/check if window contains iframe/
if (!w1._frame) {
w1.attachURL(url);
} else {
w1._frame.window.contentDocument.location.href = url;
}
}
This approach allows to create a window only once and hide instead of remove it.