Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFLocation Tag Attributes

Status
Not open for further replies.

CFTyrant

Programmer
Mar 25, 2002
13
0
0
US
I am using a frameset and application.cfm file in the restricted access section of my site.

The application.cfm checks to see if the user is logged in, if they are not the application.cfm uses the cflocation tag to call login.cfm.

The problem that I'm experiencing is that because there are two frames the login.cfm is opened in both of them.

Is there a way to get the system to open the login.cfm in the _top of the frameset?

Any suggestions are appreciated!

THanks!
 
The way i got round this was to use <cflocation url=&quot;login.cfm&quot;>, but not to load this within a frame set. Then when the user logs in, the details are parsed to handler page, which processes the details & then does a <cflocation url=&quot;frames.cfm>. But then again, i'm a novice & i'm sure there is a better way of doing it.
 
One other option is to check the script name and load the login as long as it's not the other page.

<cfif cgi.script_name neq &quot;/navbar.cfm&quot;>
<cflocation url=&quot;login.cfm&quot;>
</cfif>

You could also pass a url variable to pages that shouldn't redirect to the login and check that.

<frameset src=&quot;navbar.cfm?login=no&quot;>
<frameset src=&quot;content.cfm&quot;>

In application.cfm

<cfparam name=&quot;Login&quot; default=&quot;yes&quot;>
<cfif login is &quot;yes&quot;>
<cflocation url=&quot;login.cfm&quot;>
</cfif>

Good luck,
GJ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top