• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Cookie Question

Participant ,
May 01, 2006 May 01, 2006

Copy link to clipboard

Copied

What am I doing wrong??
Variable1 is not defined, but variable2 is defined.
Page has also been reloaded several times to make sure the cookie existed prior to the page loading.
When checking my cookies folder, both are listed in the same txt file.
TOPICS
Advanced techniques

Views

202

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , May 02, 2006 May 02, 2006
Nevermind. I figured it out. Someone should have picked up on this relatively quickly. I thought the problem was on the cold fusion side, but it was on the javascript side. I didn't set the expirer property correctly. 'Never' doesn't work. Had to use the following...

var nextyear = new Date();
nextyear.setFullYear(nextyear.getFullYear() + 1);
document.cookie = "blah blah; expires=" + nextyear.toGMTString() + "; blah;";

Votes

Translate

Translate
Participant ,
May 02, 2006 May 02, 2006

Copy link to clipboard

Copied

LATEST
Nevermind. I figured it out. Someone should have picked up on this relatively quickly. I thought the problem was on the cold fusion side, but it was on the javascript side. I didn't set the expirer property correctly. 'Never' doesn't work. Had to use the following...

var nextyear = new Date();
nextyear.setFullYear(nextyear.getFullYear() + 1);
document.cookie = "blah blah; expires=" + nextyear.toGMTString() + "; blah;";

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation