Forum Discussion
Adding current date not working
- 2 months ago
EDIT: Is see in the console a reference to SystemDate, but the JavaScript is attempting to set CurrentDate. Can you confirm you Storyline variable is named CurrentDate and referenced as %CurrentDate% in the tex box
-------------
Do you mind sharing you .story file. You can just attach to the post. One thing I would check is just make sure your variable CurrentDate is spelt correctly and does not contain whitespace before or after it wherever it is referenced.
Just copy one correct instance and then paste wherever it is referenced to be sure.
Happy to check your file if no luck still.
Hi soucie what problem are you seeing?
There doesn't appear to be any issues with the script and functionality you have described. This works fine for me in Preview and when published.
When you publish and attempt to run, and it doesn't work, hit F12 on your browser, and check the tab labelled "console". Check for any errors in there. They will be marked with red text. Paste them into this discussion. It may be a browser/environment specific issues. Having said that though, there isn't anything that is pushing the boundaries in the JavaScript. All pretty standard stuff.
FYI: JavaScript does now execute in Preview mode, so you should see the date.
Thank you for confirming I set it up correctly; here are the errors I get. Any idea what I would need to do to fix this? I am so grateful for you chiming in on this!
- SamHill2 months agoSuper Hero
EDIT: Is see in the console a reference to SystemDate, but the JavaScript is attempting to set CurrentDate. Can you confirm you Storyline variable is named CurrentDate and referenced as %CurrentDate% in the tex box
-------------
Do you mind sharing you .story file. You can just attach to the post. One thing I would check is just make sure your variable CurrentDate is spelt correctly and does not contain whitespace before or after it wherever it is referenced.
Just copy one correct instance and then paste wherever it is referenced to be sure.
Happy to check your file if no luck still.
- elearningkaren2 months agoCommunity Member
SamHill - you are my HERO! All fixed and working perfectly thanks to you! I could cry I am so happy right now! Thank you so much for making my day. :)
- SamHill2 months agoSuper Hero
Great, could you mark my post as the solution. Thanks.
Related Content
- 5 months ago
- 5 months ago
- 5 months ago