dhxWindows modal while processing

Here’s what I’m trying to do.

I want to display a modal window while doing a long process in javascript then close the window.



But the window doesn’t come up. It comes up if I put let say an alert to “stop” the process.

But if I let it run the window is never displayed.



var id = “message_window”;

var win = dhxWins.createWindow(id, 50, 50, 200, 200);

dhxWins.window(id).setModal(true);

dhxWins.window(id).button(“minmax2”).hide();

dhxWins.window(id).button(“minmax1”).hide();

dhxWins.window(id).button(“close”).hide();

dhxWins.window(id).button(“park”).hide();

dhxWins.window(id).progressOn();

dhxWins.window(id).center();

dhxWins.window(id).setText("");

dhxWins.window(id).attachHTMLString("

" + message + “
”);

dhxWins.window(id).show();



//do some long javascript processing



dhxWins.window(id).close();



Any idea on how to force the window to display or to wait for the window to be shown before continuing the process?



Thank you.

Try attached sample.

demo.zip (51.4 KB)