Sounds like you need to use a different scope.  Look into the Application
and Server scopes.  You will need to use CFLOCK with either of those.

Another option would be to store the value in a database.  I would suggest
that that's both the simplest (can avoid locking issues) and most scalable
solution.

Bob

-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 12, 2000 7:41 AM
To: CF-Talk
Subject: Setting Global Variables


Hi,

Am doing an Intranet App and I have a variable named branch that is set as
follows:

<cfset branch =
"HKEY_LOCAL_MACHINE\Software\Denny\WebServer\CurrentVersion\Multihome\Hostna
me">

On the same page, I have a form which can update the variable, using a text
box, but I need to set it "Globally" and I'm not sure how.  The form is
submitted to the same page, and uses a hidden "action" variable which is
determined using a <cfcase> tag and <cfswitch>:

<cfform action="index.cfm" method="post"><p>The current branch is:<br><br>
<input name="branch" type="text" size="100"
value=<cfoutput>#branch#</cfoutput>>.<br><br>
Click here to change:
<input type="hidden" name="action" value="changebranch">
<input type="Submit" value="Change">
</cfform>

(and then on submit...):

 <cfcase value="changebranch">

<p> Change Branch code goes here.
<cfset branch = #form.branch#>

 </cfcase>

It's setting the update "branch" value, but only for that section of the
page.  How can I set it so that it updates #branch# wherever mentioned?

Sorry if I've not made myself clear, and thanks in advance.

Will

--
Coming soon: http://www.LocalBounty.com
Local Classified Advertising for the UK

----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to