Have you given thought to using Session variables?

--K

-----Original Message-----
From: Brent Goldman [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 17, 2001 1:17 AM
To: CF-Talk
Subject: passing variables between pages


Hi,

I am currently writing an online resource scheduling application, and
multiple variables need to be passed between the pages contained within the
application.  The variables include the date of the schedule the user is at,
the office, the category, the function, and the sub-function.  Every time I
added a variable, I needed to go to every link in the page and add in the
new variable.

To manage all of these variables in one string, I wrote a variable-managing
template. This template generates the variable #urlString#, which contains
the values of all of the other variables.  This variable is then added to
the end of each and every link in the whole entire page.  Now, whenever I
add a variable, I just change this one variable-managing template, and all
of the links on the entire page are immediately update.

There is a problem with this.  If a link is setting a variable, such as
changing the function, this link will not work.  So the template I made also
generates variables in the form #(variableName)UrlString# (eg. the varaible
#fn# will generate the variable #fnUrlString#).  These excluding variables
are used every time a link needs to change a value of a specific variable.

Everything seems to work now.  But it doesn't.  Here is an example.  One
link on the page changes the function to "wizard", which is not the default
and most widely used function in my application called "schedule".  When I
click this link, I am obviosuly brought to the wizard section of my
application.  Two other links on my page just change the sub-function,
assuming that the main function is "schedule".  But when the function is
"wizard", these links change the sub-function, but the function is still
"wizard", so the desired effect isn't reached.  These sub-functions only
work if the function is "schedule".  The variable-managing template I wrote
only createa one-level excluding variables, while these links need to omit
two variables: "fn" AND "subfn".

Is there a better way to manage variables?  Although my way is efficient
because updating one template changes every link on the page to the desired
effect, it doesn't work if we need to change TWO variables in the same link?
  How does anyone else manage multiple variables on a single page?  Can
anyone please help?

-Brent
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to