Close windows on session timeout. Can I find all the open windows

R

RJN

Hi

Sorry for posting again.
I open a few pop-up windows from a main window. If session time out
occurs in either the main window or the pop-up windows ,I redirect the
user to login screen. Currently what is happening is , suppose session
times out in a pop-up window, then the login screen opens in the same
window. I want to close all the Pop-up window, main window and redirect
the user to the login screen. If I can redirect to the main window is
also ok, but all the pop-up windows must be closed. Is there a clean way
of doing this. Similar situation arises in case of an error where I
redirect to an error page. Is there a way to find all the windows that
have been opened from this application

Regards

RJN
 
K

Ken Dopierala Jr.

Hi,

In order for this to work, your main window would need to be open at all
times. You would also need to add a frameset to your main window and create
a 1 pixel frame or something that would never change. In this frame you
could create an array or window objects. Every time you launch a popup from
your main window add a reference to this popup to the array. Whenever you
need to close all the windows, loop through this array, test if the window
is still there (not null or undefined) and if it is then close it. You
could also run a little script on a timer in the hidden frame that
occasionally loops through the array and discards windows that no longer
open. Good luck! Ken.
 
R

RJN

Hi Ken

Thanks for your reply. Will you be able to explain this with some code
sample.

Regards

RJN
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top