Session Timeout and Frames

Posted on 2005-03-23
Medium Priority
Last Modified: 2013-12-24
After the user logs in, he is redirected to a frame admin area. If the session variable times out, then it includes the login form (into one of the frames) Is it at all possible to redirect them?

<!--- Application.cfm --->
<cfapplication name="OrthoIntranet" sessionmanagement="Yes" clientmanagement="yes" sessiontimeout="#CreateTimeSpan(0,1,0,0)#">

<!--- If user is not logged in, force them now --->
<cfif NOT IsDefined("Session.Intranet")>
      <!--- If user is now submitting "Login" form --->      
      <cfif IsDefined("form.username") AND IsDefined("form.password")>
            <!--- Include "Login Check" now --->
            <cfinclude template="login_Check.cfm">
      <!--- If not display login form --->
      <cfinclude template="login_Form.cfm">

<!--- Login Check --->
<!--- Find records with username and password --->
<cfinvoke component="Components.Users" returnvariable="qGetUser" method="Login">
      <cfinvokeargument name="username" value="#form.username#">
      <cfinvokeargument name="password" value="#form.password#">

<!--- If the username and password are correct --->
<cfif qGetUser.RecordCount>
      <cflock scope="session" type="exclusive" timeout="10">
            <cfset Session.Intranet = StructNew()>
            <cfset Session.Intranet.UserID = qGetUser.UserID>
            <cfset Session.Intranet.FirstName = qGetUser.FirstName>
      <cflocation url="index.cfm">
      <cfset message = "Invalid username and password!">      
Question by:JRockFL
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Expert Comment

ID: 13617399
I did not understand your problem correctly. When do you want to redirect them?
You can always use <cflocation url="someurl" addtocken="yes">

LVL 18

Accepted Solution

Plucka earned 1000 total points
ID: 13617663
Yes it's possible.

Just target the frame.

<cfif condition eq "True">
    <script language="JavaScript">


Author Comment

ID: 13618119
I'm trying a different login approach. The application file tests to see if the user is logged in our not. If they are not logged in, it will force them out of the frames to the login page.

The javascript is what I needed. Sorry if I dont not explain myself well.

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question