On Sat, 26 Jun 2004 13:41:51 +0800, Alex <xz****@hotmail.com> wrote:
Hi
I am currently working on a project and i happened to encountered a
problem
which is very pricky.
I have used formsAuthentication in my project. Manually codes an
authenticationTicket. And now i realise a problem which has something
to do
with session expiry. My project includes popups of windows. And i
realise
that when my session expire, the javascript link on the parent window
will
still open up the child window and the redirection to the login page was
done on the pop up instead. But i would like to redirect on the parent
window instead of the popup window.
Any help would be appreciated.
Thanks
All I can say is somehow track whether the login page is displayed in a
popup window, then redirect the window.opener to the login page and close
the popup window (this all happens in the popup window's Javascript,
meaning in login.aspx, e.g.).
Perhaps the easiest way to tell if your popup was opened by one of your
links is to add some querystring arg (like &window=popup) and then
login.aspx can check for this and do the above logic.
But you have to do this yourself; your link is popping up via Javascript
so there's no way for the server to tell the browser what has happened.
--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET