Window bringToTop

Hi
I have a popup window, and a progress bar window which is shown on top of this while loading, but during progressbar window display, my parent pop up is available for edit. i used window.bringToTop(), bringToBottom methods but doesn’t seem to be working.

Sample code is as follows
First popup’s js is like
if (windows == null) {
windows = new dhtmlXWindows();
windows.setImagePath(dhtmluri + “/dhtmlxWindows/codebase/imgs/”);
}
win = windows.createWindow(“searchwindow”,50,50,1170,475);
win.setText(“Search”);
windows.window(“searchwindow”).center();
windows.window(“searchwindow”).setModal(true);
win.button(“minmax1”).hide();
win.button(“park”).hide();
windows.window(‘searchwindow’).denyResize();

here i add an accoridon and then a grid to it, while grid is loading i call showProgress() which is like
function showProgress() {

var str = "<div align=\"center\"><br/><br/><br/><br/><img src='" + contextPath
		+ "/images/progress_bar.gif' width=\"150\" height=\"20\"/></div>";

if (progressWin == null) {
	progressWin = new dhtmlXWindows();
	progressWin.setImagePath(dhtmluri + "/dhtmlxWindows/codebase/imgs/");
}
if(progressWin.window("progressW1") != null) {
	progressWin.window("progressW1").show();
}else{

	progressW1 = progressWin.createWindow("progressW1", screen.width / 2,
			screen.height / 2, 320, 100);
			progressWin.window("progressW1").attachHTMLString(str);
	progressW1.button("close").disable();
	progressW1.button("minmax1").hide();
	progressW1.button("park").hide();
	progressW1.centerOnScreen();
}
progressWin.window("progressW1").setModal(true);
progressWin.window("progressW1").hideHeader();
progressWin.window("progressW1").bringToTop();
if(windows != null && windows.window("searchwindow")!=null){
	progressWin.window("progressW1").setModal(true);
	//win.setModal(false);
	 windows.window("searchwindow").bringToBottom();
}

}

But the parent window is not disabled, i can type in the grid header filters etc. I also tried making the dhtmlXWindows object same for both these (i.e. win and progressWin as one obj shared by both) but had issues with closing of the window.

Please help

regards

Hi,

Why do you create the new dhtmlXWindows instance if you have one already (windows = new dhtmlXWindows();)?
progressWin = new dhtmlXWindows();

Try to create the “progress” window for “windows” object:

progressW1 = windows.createWindow(“progressW1”, screen.width / 2,
screen.height / 2, 320, 100);

If the problem is not solved, please attach the complete demo to the post. In this case we could recreate the problem.