For something simple like that, I'd store it in the user's prefs in the 
session scope. That way you don't have to set another cookie - the cf 
session cookie already exists. You may want to store the value with the 
user's account / login / etc. so it'll hang around longer.

Client Scope is a nice concept but the problems are many in the current 
implementation:
http://www.dopefly.com/pages/ColdFusionClientVariablesFinalNail.cfm
http://www.petefreitag.com/item/406.cfm

On 9/18/11 12:21 PM, funand learning wrote:
> Thanks for the answer. Between session, client and cookie, I think i will
> have to use client/cookie to store the values because I will need the values
> to be available for multiple browsers. I mean, the user might want to open a
> new browser using 'CTRL + N', so the value of tax year on new window should
> be the same as the one selected on the old window.
>
> One last question is:  which is the better option between Client and cookie?
>
> On Sun, Sep 18, 2011 at 3:07 PM, .jonah<jonah....@creori.com>  wrote:
>
>> On 9/18/11 11:54 AM, fun and learning wrote:
>>>> Or you can just do
>>>>
>>>> <cfset session.dd_year = form.dd_year>
>> Yes, in the form submission handler, but you'll need to param
>> session.dd_year otherwise your output will fail until you submit the form.
>>
>> <cfparam type="numeric" name="session.dd_year" default="" />
>>
>>> Can we use Request scope in this type of situations?
>> No, the request scope only lives for a single page load, everything is
>> gone when the page is sent to the browser.
>>
>>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:347510
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to