Re: dumb question client variables

2003-01-29 Thread Dave Carabetta
hi there.

If I wanted to remove the value of a client variable I have set for a
particular user, lets just say, emailAddress, and they check a checkbox
that says, Forget my email address, would the best way to do that, be
to have this code...

cfset client.EmailAddress = 

to just zero the value out?

Not entirely sure what you're trying to do, but why not use 
DeleteClientVariable(EmailAddress) to delete that particular client 
variable? This has the added benefit (albeit minimal) of one less client 
variable CF needs to return with every page request. Then just do an 
IsDefined(client.EmailAddress) to check for that particular client 
variable when you need to.

Alternatively, you can indeed just do cfset client.EmailAddress =  in 
your code to null out the value for that client variable, and then just do 
a cfif Len(client.EmailAddress) to check for a value.


brain fartage on a stinkin cold rainy Wednesday

Hey, it could be worse. It's snowing here!! (New York City)

Regards,
Dave.


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

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




RE: dumb question client variables

2003-01-29 Thread Tony Weeg
dave you hit the nail on the head,
however gary houck had already
emailed me off list that function ;)

I just didn't know it even existed!!!

later and thanks!

...tony

Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping  reporting
www.navtrak.net
410.548.2337 

-Original Message-
From: Dave Carabetta [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 29, 2003 4:22 PM
To: CF-Talk
Subject: Re: dumb question client variables


hi there.

If I wanted to remove the value of a client variable I have set for a
particular user, lets just say, emailAddress, and they check a checkbox
that says, Forget my email address, would the best way to do that, be
to have this code...

cfset client.EmailAddress = 

to just zero the value out?

Not entirely sure what you're trying to do, but why not use 
DeleteClientVariable(EmailAddress) to delete that particular client 
variable? This has the added benefit (albeit minimal) of one less client

variable CF needs to return with every page request. Then just do an 
IsDefined(client.EmailAddress) to check for that particular client 
variable when you need to.

Alternatively, you can indeed just do cfset client.EmailAddress = 
in 
your code to null out the value for that client variable, and then
just do 
a cfif Len(client.EmailAddress) to check for a value.


brain fartage on a stinkin cold rainy Wednesday

Hey, it could be worse. It's snowing here!! (New York City)

Regards,
Dave.



~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm

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




RE: dumb question client variables

2003-01-29 Thread Andy Ousterhout
Depends how you use it.  If you want to check if available using
StructKeyExists, use

StructDelete(structure, key [, indicatenotexisting ])

If you want to check by Len() GT 0, then just empty out with .

Andy

-Original Message-
From: Tony Weeg [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 29, 2003 2:39 PM
To: CF-Talk
Subject: dumb question client variables


hi there.

If I wanted to remove the value of a client variable I have set for a
particular user, lets just say, emailAddress, and they check a checkbox
that says, Forget my email address, would the best way to do that, be
to have this code...

cfset client.EmailAddress = 

to just zero the value out?

brain fartage on a stinkin cold rainy Wednesday

thanks

...tony

Tony Weeg
Senior Web Developer
UnCertified Advanced ColdFusion Developer
Information System Design
Navtrak, Inc.
Mobile workforce monitoring, mapping  reporting
www.navtrak.net
410.548.2337


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=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