Flash guy - Use a session variable.

DDBLists - you need cflocks on that code even in cfmx.  Its the classic
example of a race condition.


----- Original Message -----
From: "FlashGuy" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 17, 2002 12:53 PM
Subject: Re: Incrementing a variable


> If I close the brower the application.child variable doesn't get cleared?
>
>
> On Tue, 17 Dec 2002 13:30:50 +0100, DDB Lists wrote:
>
> > Your application.cfm is loaded on every refresh so the variable is set
to
> > zero every time.
> > You should put it in a persistant scope and check for it's existance:
> >
> > <cif not isdefined("application.child")>
> > <cfset application.child = 0>
> > </cfif>
> >
> > and
> >
> > <cfset application.child = application.child + 1>
> >
> > ----- Original Message -----
> > From: "FlashGuy" <[EMAIL PROTECTED]>
> > > I have the following in my application.cfm file
> > > <cfset child = 0>
> > > In my index.cfm file I have the following.
> > > <cfset child=child + 1>
> > > Everytime I refresh the page manually or by using an <a href within mu
> > file to reload mu index.cfm it doesn't increment?
> >
> >
> >
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to