Set the session variable as a local variable at the top of the page, and 
lock this cfset.

Then reference the local variable as you would the session, in the 
JavaScript. By doing this you only have to lock it once (at the top). 
Should not have any side-effects.

HTH 

Chris Bohill


-----Original Message-----
From: Chris Norloff [mailto:[EMAIL PROTECTED]]
Sent: 13 December 2001 14:29
To: CF-Talk
Subject: lock var inside JS script?


I'm reviewing some code, and found a
"<cfif not session.web_access>" inside a javascript function.

I assume this read should be locked, but I'm not sure how to do it 
inside the js function.

I could move session.web_access into another scope before the js 
function, but since it's someone else's code I'm wary of doing that 
because it could have effects I can't see now.

Ideas?

thanks,
Chris Norloff

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to