From: GwenP on
Hi there

Anyone know the best way to use DHTML modal windows on a classic asp page?
It seems in all examples we open them, then just hide them from the modal
page to close them? Does this not just eventually hog memory - my IE has
been crashing a lot and I'm not convinced its not due to all my open modal
windows that are now just hidden? How do we detect using a javascript
function (which opens the windows in the first place) if a dhtml window is
already open but just hidden?

Many thanks
GwenP
From: Bob Barrows on
GwenP wrote:
> Hi there
>
> Anyone know the best way to use DHTML modal windows on a classic asp
> page?
The same way you would do it on a regular htm page. This question is not
really relevant to asp. All asp does is run on the server and generate
html to be sent to the client. Once the client is involved, asp is out
of the picture.
You will likely get better answers posting to a group devoted to
html/dhtml questions (http://groups.google.com/groups/dir?sel=33584039).

> It seems in all examples we open them, then just hide them from
> the modal page to close them?

Examples? What examples? I only hide them if I intend to reuse them.
They should be closed when no longer needed

> Does this not just eventually hog
> memory - my IE has been crashing a lot and I'm not convinced its not
> due to all my open modal windows that are now just hidden?

Try and confirm this with Task Manager

> How do we
> detect using a javascript function (which opens the windows in the
> first place) if a dhtml window is already open but just hidden?
>
I would assume you would have set a global variable to reference the
window when you opened it. If not, change your methodology now. You
should create a function Called getModalWindow() that checks to see if
the global variable contains a reference to an open window -
if(modalvar). If so, return that variable. If not open a new window
assigning the result of the open method to the variable and return the
variable. In the onclose event, close the window if it is open.
--
HTH,
Bob Barrows