I personally prefer not to mix and match url and form variables and would simply use a hidden form field.

- Calvin
  ----- Original Message -----
  From: Kevin Graeme
  To: CF-Talk
  Sent: Thursday, November 13, 2003 9:17 AM
  Subject: Re: Best Practices

  I like the idea of just moving the url variable into a hidden form variable.
  Since the question is about best practices, would there be any reason not to
  set the url variable to a session variable instead?

  And if the goal is to reduce templates, I can see this whole process
  happening on a single template.

  Very roughly:

  If url.variable exists, set its value to the session.variable
    run appropriate queries based on that session variable
  ElseIf no url.variable but session.variable already exists
    run appropriate queries based on that session variable
  Else
    display a selection of reports as links that pass url.variable

  The advantage of this would be to let the user skip off to other pages then
  come back and still see the report without having to explicitly select it
  again.

  -Kevin

  ----- Original Message -----
  From: "Andy Ousterhout" <[EMAIL PROTECTED]>
  To: "CF-Talk" <[EMAIL PROTECTED]>
  Sent: Wednesday, November 12, 2003 9:53 PM
  Subject: RE: Best Practices

  > If the user always has to click on a button to move to the next step, you
  may
  > wish to place the reports needed in a hidden form variable rather then in
  a
  > URL variable.  You may find that this increases the clarity of the code,
  > especially when someone has to come back to the page at a later date.
  >
  > Andy
  >   -----Original Message-----
  >   From: Mickael [mailto:[EMAIL PROTECTED]
  >   Sent: Wednesday, November 12, 2003 4:45 PM
  >   To: CF-Talk
  >   Subject: Best Practices
  >
  >
  >   Hello,
  >
  >   I am in the middle of reworking an app and trying to eliminate many of
  the
  > templates that were created by me (in my cut paste, make a new template
  days
  > instead of making smarter templates)
  >
  >   What is have in essence are 6 reports that are practically the same the
  > differences are they run the same queries on different tables, and update
  them
  > as well.
  >
  >   Each page is a report is a self posting page that has reports that need
  to
  > be checked off by the user as completed.
  >
  >   So now this is what I am trying to do.  When the user clicks on the
  report I
  > have appended ?Reportname=myreport to the link.
  >
  >   Now I have a case statement that uses #url.reportname# that will set all
  my
  > variables for that page.  Until now it is fine.  The only problem that I
  am
  > running into is when I try posting the page to itself to the the update
  (set
  > the completed from 0 to 1) of course my reportname variable is non
  existant.
  > What would be the most best way to do set up this?  When I try to post the
  > same page of course my URL.ReportName does not exist so my switch
  statement
  > does not work.
  >
  >   Any pointers in the right direction would be much appreciated.
  >
  >   Thanks.
  >
  >   Mike
  >
  >
  >
  >

[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to