Why not include the scope with your variables?  I would also recommend using
the isDefined function instead of ParameterExists.  So it would look like
this:

<CFSET Session.MyVar=1>

<CFIF isDefined("Session.MyVar")>True<cfelse>False</cfif>

The problem may just be that CF doesn't check the Session scope when you use
just a variable name, it checks the local, url, form, etc. scopes but I'm
not sure if it looks up the session scope for MyVar unless you explicitly
state it as session.MyVar.  It's worth a try.


Andrew Hewitt
Web Application Developer
webworld studios, inc.


----- Original Message -----
From: "Dave Notik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, August 16, 2000 7:39 PM
Subject: HELP: Client.myVar vs. Session.myVar -- inconsistencies?


> Folks:
>
> Client variable specific question:  We discovered a scenario where
> client-scoped variables behave completely different than session-scoped
> variables when referencing the variable w/out a scope.  Doesn't make
sense?
> Example:
>
> CASE 1:
>
> Page1.cfm:
> <CFSET Client.MyVar=1>
>
> Page2.cfm:
> <CFIF ParameterExists(MyVar)>True<cfelse>False</cfif>
>
> CASE 2:
>
> Page1.cfm:
> <CFSET Session.MyVar=1>
>
> Page2.cfm:
> <CFIF ParameterExists(MyVar)>True<cfelse>False</cfif>
>
>
> Case 1 outputs "True", whereas Case 2 outputs "False".
>
>
> This royally sucks, because we recently switched all session-scoped
> variables to the client scope, and now things are evaluating completely
> different.
>
> Any suggestions?  Using ColdFusion Server 4.01.  Thanks in advance.
>
> -Dave
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
>

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to