0 Replies Latest reply on Oct 1, 2007 5:20 AM by Irish-Phoenix

    My cookie has a bug. Please help

    Irish-Phoenix Level 1
      I am working with this cookie, It works nice, but there is a bug in it and I can't figure out what the problem is. Here is my code:

      PAGE 1:
      <cfif IsDefined("cookie.hitbox")>
      <cfif IsDefined("cookie.hitbox")>
      <a href="apply-setting.cfm?engage=hitbox"><strong><u>Enable</u></strong></a><br>
      <a href="apply-setting.cfm?deactivate=hitbox"><strong><u>Disable</u></strong></a><br>

      PAGE 2:
      <cfif IsDefined("deactivate")>
      <cfcookie name="#deactivate#" value="Off" expires="never"><!--- <cookie defined - stop music> --->
      <cfelseif IsDefined("engage")>
      <cfcookie name="#engage#" value="temp" expires="NOW"><!--- <cookie removed music is on> --->
      <cfinclude template="soundedit.cfm">

      When you click on the link on the first page, it hits the 2nd page and is suppoed to go back to the first page and show the appropriate link, either disabled or engaged. When I disable it with that link it works fine, but when I engage it with that link, it just hangs up and doesn't go back to the page with the kinks on them. No errors, and it does engage the code, but won't use the <cfinclude> I even had a problem with that code as well, I had to use an include instead of a cflocation to get the deactivate to work properly and go back the page 1. I also tried putting the cfinclude in both parts of the if statement, and it doesn't work with the engage.

      Did I do something wrong in my code? Why is it hanging up on me? I am using CF 6.

      Thank you.