it works fine first time but not from the second time. when i click second time i can see the window but content from div(id=obj) is not being attached.
after closing window its content removed. If you open the same window several times, it would be better to hide it instead. The example:
function openInWindow(obj) {
if (!dhxWins) dhxWins = new dhtmlXWindows();
if (!dhxWins.window(“w1”)) {
var w1 = dhxWins.createWindow(“w1”, x, y, w, h);
/this event is called when “close” button is pressed/
w1.attachEvent(“onClose”, function(w){
if (win.getId() == “w1”) {
/detaches object and attaches it to body/
win.detachObject();
/hides window/
win.hide();
}
});
} else {
/shows window/
var w1 = dhxWins.window(“w1”);
w1.show();
}
/attaches object/
w1.attachObject(obj);
}
I have got one window(w1) that is configured with the settings on which is working fine.
So now I want to extend it to load with different values according to the different parameters.
Each time i click that window,layout will be the same and values should load dynamically from the server(for this i have got jsp that generates xml). Because, I’m attching an object(
-contains combo and grid in it) to the window. So, the combo and grid should load with different values when i call it from different places(I’m calling it through javascript mathod createWindow(“w1”))
// code will be something like this
function createWindow(win){
show(“win”);// which shows the raw window with settings that generated when onload().
dhxWins.window(win).attchObject(“obj”); // Object will be added with combo and grid.
// so from here is there any way to populate this with different values?.
// is it possible to clear previous values and generate again with new ones?.
}