Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by sbritton on Jun 07, 2008 23:27
open dhtmlx forum
Show progress while loading URL

I have a URL that takes a 3-8 seconds to load into the window and I would like to give some indication to the user that something is working so they know to wait.

I would be happy with any of the following:

1.) I would like to have the progress spinner show while the URL is loading and stop when it is done. I tried to the following unsuccessfully...it turns it on then off right away because the attachURL does not wait.
w1.progressOn();
w1.setText("Window Title");
w1.attachURL("http://www.myurl.com");
w1.progressOff();

2.) I would be okay if the text inside the window would show a message that is replaced with the new content. I have tried the following unsuccessfully
w1.setText("Window Title");
w1.attachURL("http://www.myurl.com/wait_msg.htm"); //Simple HTML that just says "Loading...please wait..."
w1.attachURL("http://www.myurl.com");
Answer posted by Support on Jun 09, 2008 03:02
>>1.) I would like to have the progress spinner show while the URL
It was a bit hard to implement with original code , you can try to use attached version instead of original one ( latest build ) - it provides additional event - onContentLoaded

w1.progressOn();
w1.setText("Window Title");
dhxWins.attachEvent("onContentLoaded", function(win){
    win.progressOff();
});
w1.attachURL("http://www.myurl.com");



Attachments (1)
Answer posted by dactar on Jun 11, 2008 00:56

Hello, I've the same need.

Does this new feature (onContentLoaded) will take part of the official next version of dhtmlxwindows ?

Answer posted by Support on Jun 11, 2008 02:20
Yes, this event will be part of next version of dhtmlxWindows.