Redirect parent of a page from a cfwindow

Posted by Ryan French on Stack Overflow See other posts from Stack Overflow or by Ryan French
Published on 2010-05-03T04:10:48Z Indexed on 2010/05/03 4:18 UTC
Read the original article Hit count: 303

Filed under:

Hi All,

I have a page with cfwindow that require the user to be logged in to view the content on the page. The problem at the moment is if the user logs into the site, then does nothing and the session times out, I have no way that I can think of to redirect the parent of the window to the login screen when the user opens it.

So far I have tried using cflocation but that has no way of specifying the container that should be redirected (i.e. the page in the window is being redirected but not the windows parent). I have also thought about using a hidden input with a value based on the session which is then check with Body onLoad event but currently this doesnt work with how the pages have been setup.

The last option I have is to check the session variable on loading the window and then closing it if the user is not logged in, which will cause the parent to refresh and redirect to login anyway. However I cant find a way to close a cfwindow without using javascript.

Thanks for any help you can give.

© Stack Overflow or respective owner

Related posts about coldfusion