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

Javascript and SESSION variable

Community Beginner ,
Apr 05, 2007 Apr 05, 2007

Copy link to clipboard

Copied

Everyone,

Here is my question. I am putting together an application and I am using a Javascript date picker. What I would like to do is when the form gets submitted back to itself I would like to set a SESSION variable to the date that was picked so when someone goes back to the page it has the selected date already chosen and not today's date as is happening now. My knowledge of javascript is somewhat limited but I am including a link to the js file as well as the page code that calls it. It looks like var = Today Date(); is what I need to change I am just not really sure how to go about doing this. Any help would be greatly appreciated.

Thanks in advance.

Daniel Krajc

Link to the javascript:
http://www.redpegonline.com/new_version/assets/calendarDateInput.js

TOPICS
Advanced techniques

Views

285

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

Community Beginner , Apr 05, 2007 Apr 05, 2007
Everyone,

I went back to the documentation that Jason Moon provided with the script and looking at it a lot closer than before I figured out that I can set the SESSION variable in the <script>DateInput('preferred_dueDate', true, 'DD-MON-YYYY')</script> with a cfoutput.

Lesson learned, read the documentation.

Thanks.

Daniel Krajc

Votes

Translate

Translate
Community Beginner ,
Apr 05, 2007 Apr 05, 2007

Copy link to clipboard

Copied

Everyone,

I went back to the documentation that Jason Moon provided with the script and looking at it a lot closer than before I figured out that I can set the SESSION variable in the <script>DateInput('preferred_dueDate', true, 'DD-MON-YYYY')</script> with a cfoutput.

Lesson learned, read the documentation.

Thanks.

Daniel Krajc

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
LEGEND ,
Apr 05, 2007 Apr 05, 2007

Copy link to clipboard

Copied

LATEST
To expand on what you have already done, if you set a cookie when the form is submitted, you can retrieve the previously selected date on subsequent sessions as well as the current session.

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