OK...but every time I hit the refresh it increments. I don't want that. Also everytime I drill down into the directory structure I also want the counter to decrement if I click on a link to go back.
Probably too much work, right? On Tue, 17 Dec 2002 13:11:03 -0000, webguy wrote: > Use a session instead of a application scope > > In Application.cfm > > <CFLOCK TIMEOUT="5" THROWONTIMEOUT="No" TYPE="EXCLUSIVE" SCOPE="session"> > <CFPARAM NAME="session.child" DEFAULT="0"> > </CFLOCK> > > And in the index file > > <CFLOCK TIMEOUT="5" THROWONTIMEOUT="No" TYPE="EXCLUSIVE" SCOPE="session"> > <CFSET session.child = session.Child + 1> > </CFLOCK> > > > WG > > > > -----Original Message----- > > From: FlashGuy [mailto:[EMAIL PROTECTED]] > > Sent: 17 December 2002 13:02 > > To: CF-Talk > > Subject: RE: Incrementing a variable > > > > > > No...no error. code works just fine. > > > > Its not not behaving like I want it to. > > > > > > On Tue, 17 Dec 2002 12:55:38 -0000, webguy wrote: > > > > > That code looks ok to me , how is it not working ? An error ? > > > > > > > <cflock> > > > > In Application.cfm > > > > > > > > <CFLOCK TIMEOUT="5" THROWONTIMEOUT="No" TYPE="EXCLUSIVE" > > > > SCOPE="APPLICATION"> > > > > <CFPARAM NAME="Application.child" DEFAULT="0"> > > > > </CFLOCK> > > > > > > > > And in the index file > > > > > > > > <CFLOCK TIMEOUT="5" THROWONTIMEOUT="No" TYPE="EXCLUSIVE" > > > > SCOPE="APPLICATION"> > > > > <CFSET Application.child = Application.Child + 1> > > > > </CFLOCK> > > > > > > > > > > WG > > > > > > Detainees in Guant�namo: As One Year Anniversary Nears, US Bars > > Scrutiny By > > > Human Rights Group > > > http://www.amnestyusa.org/news/2002/usa12132002.html > > > > > > > > > > On Tue, 17 Dec 2002 12:26:53 -0000, webguy wrote: > > > > > > > > > Are you trying to get this result? > > > > > > > > > > 1st view of index.cfm value=1 > > > > > 2nd view of index.cfm value=2 > > > > > 3rd view of index.cfm value=3 > > > > > > > > > > > > > Yes. > > > > > > > > > If so you are doing to wrong because this is what you are > > actually doing > > > > > > > > > > > > OK..I see...how would I go about doing the above? > > > > > > > > > 1st view of index.cfm > > > > > appliation.cfm sets child = 0 > > > > > index.cfm sets child = child + 1 = 1 > > > > > 2nd view of index.cfm > > > > > appliation.cfm sets child = 0 > > > > > index.cfm sets child = child + 1 = 1 > > > > > 3rd view of index.cfm > > > > > appliation.cfm sets child = 0 > > > > > index.cfm sets child = child + 1 = 1 > > > > > > > > > > > > > > > > > > > > Webguy > > > > > > > > > > > -----Original Message----- > > > > > > From: FlashGuy [mailto:[EMAIL PROTECTED]] > > > > > > Sent: 17 December 2002 12:12 > > > > > > To: CF-Talk > > > > > > Subject: Incrementing a variable > > > > > > > > > > > > > > > > > > Hi, > > > > > > > > > > > > For some reason I can't get my variable to increment when my page > > > > > > is reloaded. > > > > > > > > > > > > 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? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------- > > > > > > Colonel Nathan R. Jessop > > > > > > Commanding Officer > > > > > > Marine Ground Forces > > > > > > Guatanamo Bay, Cuba > > > > > > --------------------------------------------------- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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 Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

