Close popup window on session expire

G

gvrajkumar

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
 
D

darwinist

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
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top