Setting cursor before showModalDialog

  • Thread starter Thread starter Jim Mitchell
  • Start date Start date
J

Jim Mitchell

I have a web page that I show using show ModalDialog.

The web page takes about 6 seconds to load.

No matter what I try, I can not get the cursor to show a "WAIT" until the
page is loaded in the showModalDialog Window,

I have even tried having a hidden panel in the calling web site and trying
to turn it off from the target web site using...

parent.document.getElementById("panelWait").innerHTML

But this does not work for me as well.

Thanks in advance.

Jim
 
I have a web page that I show using show ModalDialog.

Remember showModalDialog is a non-standard, IE-specific feature.
The web page takes about 6 seconds to load.

No matter what I try, I can not get the cursor to show a "WAIT" until the
page is loaded in the showModalDialog Window,

This should be done by the script in the page being shown.
I have even tried having a hidden panel in the calling web site and trying
to turn it off from the target web site using...

parent.document.getElementById("panelWait").innerHTML

But this does not work for me as well.

I don't understand, once you make a call to window.showModalDialog(), your
script stops until the dialog window is finished (closed). There will be
nowhere you can put your code in the calling page to control anything on the
dialog page.
 
If I put all of the code to show the wait in the called page, there is no
value as it is the code behind database procdessing that takes the six
seconds.

With regard to the command...

I put this just before the call to show modal dialog and then I try to turn
it to hidden from within the called page, once the called page loads.

Jim
 
as soon as you call showModalDialog, no window events are processed in the
calling window. you need to set these value, force a windows event
processing loop. you can dothis by using window.setTimeout. a downside of
the code is popup blockers may stop it.

document.getElementById("panelWait").innerHTML = "Please wait...";
window.setTimeout('popupRoutine()",1);

the best is to not use a modal dialog for this.

-- bruce (sqlwork.com)


| I have a web page that I show using show ModalDialog.
|
| The web page takes about 6 seconds to load.
|
| No matter what I try, I can not get the cursor to show a "WAIT" until the
| page is loaded in the showModalDialog Window,
|
| I have even tried having a hidden panel in the calling web site and trying
| to turn it off from the target web site using...
|
| parent.document.getElementById("panelWait").innerHTML
|
| But this does not work for me as well.
|
| Thanks in advance.
|
| Jim
|
|
|
 
Wait a minute, I am confused, what does the "hidden panel" in the calling
page have to do with the cursor type in the called page?

Further, what do you want to do with the innerHTML property of your "hidden"
panel?

You cannot set a cursor until your page is fully loaded -- simply because
the DOM is not built up yet at load time. You can, however, show a waiting
page while processing data, and redirect the page on finish. I am not sure
if that is do-able, anyways I haven't done that yet, sorry to say.

ben
 
Back
Top