Hi CFDude
Sorry about the length of it. When my cflocation tag points to either the index.cfm or a another url(our intranet homepage in which the the application.cfm resides) the client vars don't get killed at all. But when I don't have a cflocation tag the client vars get killed. Could you explain the indefinte loop further? I'm noty quite sure I follow but i think it sounds fitting for this situation.
The Application.cfm is as follows :
<cfsetting enablecfoutputonly="Yes">
<cfapplication name="bins"
clientmanagement="yes"
sessionmanagement="yes"
sessiontimeout=#CreateTimeSpan(0, 0, 30, 0)#
applicationtimeout=#CreateTimeSpan(0, 1, 30, 0)#>
<!---kill all vars on close of browser--->
<cfif IsDefined("Cookie.CFID"

AND IsDefined("Cookie.CFTOKEN"

>
<cfset Variables.cfid_local = Cookie.CFID>
<cfset Variables.cftoken_local = Cookie.CFTOKEN>
<cfcookie name="CFID" value="#Variables.cfid_local#">
<cfcookie name="CFTOKEN" value="#Variables.cftoken_local#">
</cfif>
<!--- if not otherwise stated we can assume that this application hasn't been started --->
<cfparam name="application.Started" default="false">
<!--- If the application hasn't been started then set all of the application variables --->
<cfif application.Started eq "false">
<cfparam name="application.emailserver" default="">
<!--- database bits and pieces --->
<cfset application.DS = "BINS">
<cfset application.DB = "ODBC">
<!--- standard colors --->
<cfset application.topcol = "##aaaaaa">
<cfset application.tablecol = "##a2c5df">
<cfset application.bodybgcol = "##a2c5df">
<cfset application.page1col = "##a2c5df">
<cfset application.page2col = "##a2c5df">
<cfset application.page3col = "##a2c5df">
<cfset application.page4col = "##a2c5df">
<cfset application.quikbinbgcol = "##87d1a5">
<cfset application.menucol = "##eeeeee">
<cfset application.reviewcol = "##cccccc">
<!--- base url and pathname --->
<cfset application.baseurl = "
<cfset application.basepath = "support/quality/bins/">
<!--- deadline timespans (in days) --->
<cfset application.dlrespmgr = 7> <!--- respmgr deadline (days from datecreated) --->
<cfset application.dlaction = 14> <!--- action deadline (days from datecreated) --->
<!--- security variables --->
<cfparam name="application.maxpassattempts" default="16">
<cfparam name="application.accessreadonly" default="16">
<cfparam name="application.accesscreateaction" default="32">
<cfparam name="application.accesscreateactionclose" default="48">
<cfparam name="application.accessadmin" default="56">
<!--- change application.started to "false" to reset application settings --->
<cfset application.Started = "true">
<cfset application.startedOn = "#now()#">
</cfif>
<!---
If there is a client.userID variable defined, then we have obviously
already set all of these session bits and pieces up, thus I see no real
reason to go ahead and do it again!!!
--->
<cfparam name="client.Started" default="false">
<cfif client.Started eq "false">
<!--- set defaults based on browser type --->
<!--- (a quick fix to a #$%@&! Netscape problem) --->
<CF_BrowserCheck agent="#cgi.http_user_agent#">
<cfif bc_browser eq "Netscape">
<cfset client.cols35 = 18>
<cfset client.cols40 = 21>
<cfset client.cols45 = 23>
<cfset client.cols50 = 27>
<cfset client.cols60 = 30>
<cfset client.cols65 = 32>
<cfset client.cols70 = 35>
<cfelse>
<cfset client.cols35 = 35>
<cfset client.cols40 = 40>
<cfset client.cols45 = 45>
<cfset client.cols50 = 50>
<cfset client.cols60 = 60>
<cfset client.cols65 = 65>
<cfset client.cols70 = 70>
</cfif>
<!--- session variables --->
<cfparam name="client.userid" default="">
<cfparam name="client.userkey" default="0">
<cfparam name="client.password" default="">
<cfparam name="client.permission" default="#application.accessreadonly#">
<cfparam name="client.email" default="">
<cfparam name="client.passattempts" default="0">
<cfparam name="client.loggedOut" default="false">
<cfset client.Started = "true">
</cfif>
<cf_formurl2attributes>
<cfparam name="attributes.prevaction" default="description">
<cfif isDefined("attributes.bin"

and isDefined("attributes.action"

>
<!---
Now, for each BIN, have a look at the permissions allowed for the user.
Have to pull out the info for the BIN.. it appears that I do this in every
page anyway, so I might move that query back to here!.
First set all permissions to false, and then update those ones that are allowed.
1. If they are a quality rep or higher, then they have permsission to scribble
on everything and anything;
2. If they are a quality Rep, Responsible Manager or Actionee, then let them
write to their relevant section, or to the comments...
3. Otherwise, don't give them any permissions...
--->
<!--- 1. Get the BIN info! --->
<cf_binTX txName = "BIN"
txMode = "getBIN"
txID = "#attributes.bin#">
<!--- If the userKey is 0 then they are not logged in and no write access --->
<cfif (client.userKey eq 0)>
<cfset thisBIN.canEdit = "false">
<!--- If they have Quality Rep access, it doesn't matter where they are, then can write --->
<cfelseif (client.permission ge application.accesscreateactionclose)>
<cfset thisBin.canEdit = "true">
<!--- If this is the acceptance or comments tab, or the save routine for acceptance, and
the user is the responsible manager, then they get write access --->
<cfelseif (client.userKey eq bin.respMgr) and
((attributes.action eq "acceptance"

or
(attributes.action eq "comments"

or
((attributes.prevaction eq "acceptance"

and (attributes.action eq "save"

))>
<cfset thisBin.canEdit = "true">
<!--- If this is the actionsreqd or comments tab, or the save routine for the actions,
and the user is the actionee, then they get write access --->
<cfelseif (client.userKey eq bin.Actionee) and
((attributes.action eq "actionsreqd"

or
(attributes.action eq "comments"

or
((attributes.prevaction eq "actionsreqd"

and (attributes.action eq "save"

))>
<cfset thisBIN.canEdit = "true">
<!--- If they don't fall into any of those categories, then take away write access --->
<cfelse>
<cfset thisBIN.canEdit = "false">
</cfif>
</cfif>