To go one better you could move it to the request scope so that any
custom tags on the page will still have access to it as if it was a session
var.

Kola

Kola Oyedeji |Web Developer |ekeda
elthorne gate |64 high street |pinner |middx |ha55qa
t +44(208)429 7333 f +44(208)429 7339 |www.ekeda.co.uk


> -----Original Message-----
> From: Chris Bohill [mailto:[EMAIL PROTECTED]]
> Sent: 13 December 2001 14:31
> To: CF-Talk
> Subject: RE: lock var inside JS script?
>
>
> 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
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
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