DeleteClientVariable("name")

straight outta da doc's

:) hth

tony weeg
uncertified advanced cold fusion developer
tony at navtrak dot net
www.navtrak.net
office 410.548.2337
fax 410.860.2337


-----Original Message-----
From: Pete Ruckelshaus [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, August 12, 2003 10:00 AM
To: CF-Talk
Subject: HELP! Can't clear the CLIENT scope


I'm having some trouble...I'm using CLIENT scoped variables because we
are in a load-balanced environment.  I need to delete some variables
from the client scope and it's just not working...structClear(CLIENT)
seems to work when I refresh the browser window to load that code, but
when I go back, all of the data that was in the CLIENT scope before is
still there.  I tried to go in and delete specific keys by doing
structDelete(CLIENT,client_data), one at a time, but that didn't work
either.

Is there a reliable way to delete values from the CLIENT scope?  Or am I
doing something stupid?

Thanks

Pete

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<!--- Kill the cookie --->
<cfif isDefined("URL.killclient")>
 <cfscript>
  structClear(CLIENT);
 </cfscript>
</cfif>
<cfparam name="display" default="TRUE">
<cfparam name="css_url" default="/include/main.css">
<cfparam name="page_width" default="700">
<cfscript>
 if ( isDefined("CLIENT.expiration") AND len(trim(CLIENT.expiration)) GT
0 AND dateDiff("N",CLIENT.expiration,Now()) GT request.themaxordertime)
{
  structDelete(CLIENT,client_data);
  structDelete(CLIENT,client_id);
  structDelete(CLIENT,expiration);
  CLIENT.client_id = 0;
  CLIENT.client_data = "";
  CLIENT.expiration = "";
  step = 1;
 } else if (isDefined("CLIENT.client_id") AND
isDefined("CLIENT.client_data") AND CLIENT.client_id GT 0) {
  CLIENT.client_id = CLIENT.client_id;
  CLIENT.client_data = CLIENT.client_data;
  if (dateDiff("N",CLIENT.expiration,Now()) GT request.themaxordertime)
{
   CLIENT.expiration = createODBCDateTime(dateAdd('N',
request.themaxordertime, now()));
  }
  step = 2;
 } else if (isDefined("URL.client_id")) {
  CLIENT.query_for = "client_data";
  CLIENT.client_id = URL.client_id;
  if (dateDiff("N",CLIENT.expiration,Now()) GT request.themaxordertime)
{
   CLIENT.expiration = createODBCDateTime(dateAdd('N',
request.themaxordertime, now()));
  }
  step = 3;
 } else {
  structClear(CLIENT);
  step = 4;
 }
</cfscript>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to