Close popup window on session expire

Discussion in 'Javascript' started by gvrajkumar@gmail.com, Aug 3, 2006.

  1. Guest

    Hi

    Popup window is opened and after some time session has expired. After
    session expire, if the user tries to make any actions on the popup page
    the user is redirected to login.jsp page.

    What I want is when the user tries to make any actions on the expired
    popup I want the popup window to be closed and parent window to be
    refreshed with the login.jsp page. Basically I want identify the popup
    window.

    I did the following with some assumptions and it works on firefox but
    not on IE.
    Assumption: Popup window will not have address bar visible

    added the function in onload of login.jsp

    function onLoadLoginPage(){
    if(window.locationbar.visible==false){
    opener.location.href='login.jsp';
    this.close();
    }
    }

    any suggestions or solutions will be a great help

    Thanks
    venkat
    , Aug 3, 2006
    #1
    1. Advertising

  2. Guest

    wrote:
    > Hi
    >
    > Popup window is opened and after some time session has expired. After
    > session expire, if the user tries to make any actions on the popup page
    > the user is redirected to login.jsp page.
    >
    > What I want is when the user tries to make any actions on the expired
    > popup I want the popup window to be closed and parent window to be
    > refreshed with the login.jsp page. Basically I want identify the popup
    > window.
    >
    > I did the following with some assumptions and it works on firefox but
    > not on IE.
    > Assumption: Popup window will not have address bar visible
    >
    > added the function in onload of login.jsp
    >
    > function onLoadLoginPage(){
    > if(window.locationbar.visible==false){
    > opener.location.href='login.jsp';
    > this.close();
    > }
    > }
    >
    > any suggestions or solutions will be a great help


    My suggestion is don't try to control more than the frame the user
    gives you. I hate pop-ups, even those pages I ask for should open in a
    new tab rather than a new frame, and only when I ask them to. By
    default the page I'm on should be replaced.

    I suggest you make your own pop-up windows that exist within your given
    browser frame, using html and javascript. They could contain an iframe
    if they need to be a different document.

    Here is a free examples of how to do it (firefox and ie):
    http://darwinist.googlepages.com/htmldesktop.html

    hth

    > Thanks
    > venkat
    , Aug 4, 2006
    #2
    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. Matt Jensen
    Replies:
    1
    Views:
    5,213
    Matt Jensen
    Dec 16, 2005
  2. Tongass Park Neighborhood Association, Juneau Alas

    Cookies expire immediately, not when set to expire

    Tongass Park Neighborhood Association, Juneau Alas, Oct 1, 2009, in forum: ASP General
    Replies:
    2
    Views:
    1,184
    SQLDude
    Nov 24, 2009
  3. Varun Goel
    Replies:
    1
    Views:
    143
    John Wilger
    Jan 23, 2008
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    499
    Randy Webb
    Jun 19, 2004
  5. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    351
    GĂ©rard Talbot
    Sep 2, 2005
Loading...

Share This Page