Layout type Progress bar in window

I am using dhtmlxwindow as a popup in my app.
i have 5 windows which are created initially using window object of layout object when application loaded and all in hidden mode.
based on the requirement i am showing and hiding the windows.

And i have a global window event i.e., oncontentload of window. like below.

if(win.idd == ‘winName’){
//do something
}else if (win.idd == ‘window2’){
//do something different

So my question is if i need layout like progress bar in my windows, i can do like

var layout = win.attachLayout(“1C”);

layout.progressOn(); //or layout.cells(“a”).progressOn();


as u said in one of topic in forum

but if i use attachurl method on layout cell object, window oncontentload method will not work right!

So how can do this ?

Thanks in advance!


You can put layout.cells(“a”).progressOn() in onContentLoaded event:

dhxWindow.attachEvent("onContentLoaded",function(win) { if(win.idd == 'winName'){ layout.cells("a").progressOn() //do something layout.cells("a").progressOff() }else if (win.idd == 'window2'){ layout.cells("a").progressOn() //do something different layout.cells("a").progressOff() } });

If i use attachurl method on cell object , how window oncontentloaded event works?

You can do the same loading mask for window:

var modalBar = document.createElement("DIV"); = "absolute"; = "0px"; = "0px"; = "100%"; = "100%"; = "gray"; = "0.6"; w1.vs[w1.av].dhxcont.insertBefore(modalBar,w1.vs[w1.av].dhxcont.lastChild);

In your answer you have created a div with some style.
But i ddnt undstd what the last line


can u please explain what it is and how to use it.

Thanks in advance.

This line adds object ‘modalBar’ to the DOM.

when i need progressbar i can use the modalbar as u said.
then after loding the page , i mean after completion of conted loading how can i remove that modalbar from window?


Apply ID to this div in its init: = "modalBar";

And then when you want to destroy it - call


Thanks Darya,

It is worked :slight_smile:

But cant i use the same image what we have to layout progressbar instead of this modalbar div?

You need to put this image (dhxlayout_progress_global.gif) in this div and position it.