[thelist] CF: CFCookie not sticking?

Frank lists at frankmarion.com
Fri Apr 30 10:43:48 CDT 2004

At 08:52 AM 2004-04-30, you wrote:
>Unless I misunderstand, you are trying to test for the value of the
>cookie on the same page where the cookie is set, and you will have no

Sorry, I probably wasn't as clear as I could have been. This form is on an 
exception error document. The only way to get there is if an error occurs. 
So, something breaks, you get a nice "We're sorry, the document you are 
trying to reach is screwed up. Feel free to add some comments".

The user adds comments--and submits the form, BUT the error happens again, 
preventing the "Thanks for letting us know" from showing, and it returns to 
the "Screwed up, leave a comment form". It is the same document, it is not 
in the same viewing. It is so that if the document should reload, that it 
sees that an attempt has already been made, then to offer another error 
display text WITHOUT the form.

So it goes like this

-> Exception err occurs
    --> Look for cookie. None?
    --> Display friendly err msg with form, leave a cookie ("been here")
       ---> Usr submits comments
       ---> "Thanks for contacting us..."

       ---> Exception err occurs (again, can't submit comments)
          --> Look for cookie. Oh! cookie.err_occured EQ 1
          --> Display friendly err msg WITHOUT form, give phone number or 
                (Sorry, we suck, can't send message, call us)

Also, there is no cflocation involved.

I'm choosing to use a cookie.variable because for some reason I can't use a 
session.var.  I can't seem to carry a variable across a page reload-- I 
wonder if this is because it comes from an exception error document, or 
because the exception prevents the setting of the session.var?

Frank Marion     lists at frankmarion.com      Keep the signal high.  

More information about the thelist mailing list