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

Discussion in 'ASP .Net' started by RJN, Sep 30, 2004.

  1. RJN

    RJN Guest

    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


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    RJN, Sep 30, 2004
    #1
    1. Advertising

  2. 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.

    --
    Ken Dopierala Jr.
    For great ASP.Net web hosting try:
    http://www.webhost4life.com/default.asp?refid=Spinlight

    "RJN" <> wrote in message
    news:...
    >
    > 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
    >
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    Ken Dopierala Jr., Sep 30, 2004
    #2
    1. Advertising

  3. RJN

    RJN Guest

    Hi Ken

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

    Regards

    RJN


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    RJN, Oct 8, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    8,805
    sateeshranga
    Aug 7, 2008
  2. Mark Probert

    Timeout::timeout and Socket timeout

    Mark Probert, Oct 6, 2004, in forum: Ruby
    Replies:
    1
    Views:
    1,271
    Brian Candler
    Oct 6, 2004
  3. Iñaki Baz Castillo
    Replies:
    7
    Views:
    824
    Iñaki Baz Castillo
    Jan 12, 2010
  4. Replies:
    3
    Views:
    394
    Chung Leong
    Jan 16, 2005
  5. Iulian Ilea
    Replies:
    1
    Views:
    293
    pcx99
    Dec 21, 2006
Loading...

Share This Page