Forum Discussion
Date Variables available?
Hi there - just curious to know if it's possible to have a date variable populated in Storyline?
So the course can show the date the course is being taken...
I'm thinking about using such a feature for a completion certificate.
thanks!
23 Replies
- BrianBattFormer Staff
Hi Raymond,
Although Articulate does not provide support for JavaScript coding in the Execute JavaScript trigger, you can accomplish that by using the example in the link below:
http://www.articulate.com/support/kb_article.php?product=st1&id=llwes8cn32vg
- RaymondWanCommunity Member
Hey Brian, thanks for the tip....
I'm not too familiar with Java though...i've tried reviewing your job aids but can't get a date to appear on a slide.
Any way you could take a moment to walk me through it?
Do I need to have a trigger in place in order to have a date appear on the slide?
Apologies....
- BrianBattFormer Staff
- RaymondWanCommunity Member
Hey Brian - thanks for whipping that up together quickly!
I was so close before you sent that. I had the wrong variable name input and didnt' match it with what was in the code.
Thanks so much again!
Ray
- mikemcdonaldCommunity Member
I've been thinking of a simple way of inserting an expiry date into a standalone presentation (I mean one that is not within an LMS).
Example application - if I made a sample presentation and emailed it out, but I wanted to prevent it being viewed past a certain date.
I haven't come across any way yet, so I wonder if this method could be used to do that - by coding in the 'currentdevelopment date' into the javascript that Brian demonstrated....and then if I only wanted the presentation to be viewable for the next 2 months say, I would make a sum that took the 'user system date' minus 60, and if it was positive, jump to a branch that ended the presentation (as it was being viewed more than 2 months in the future).
Does that sort of make sense? Sorry, if I've missed a really simple way of achieving the same thing - just haven't found a way yet!
Cheers
- ClaudineCaroCommunity Member
This solution was great! When I tested it on IE 7, I got the output I expected.
However when I tested in Chrome and in Firefox the variable did not display, just a blank space.
Any ideas on the difference?
thanks-
Claudine
- StephenMussonCommunity Member
I am also having trouble with getting the script to work on IE8. I copied it exactly as in the example. Is there something I should change?
- RebeccaFleischCCommunity Member
Hi All,
It doesn't work in all browsers. Perhaps it can with a tweak, but by default it doesn't work in Firefox (version 18) and DOES work in IE (version 9)
- Bernovan-SoestCommunity Member
Working with Javascript also required some Flash security settings when running it on a local machine:
Global Security Settings panel
Using the Always Allow setting did the trick for me - StephenMussonCommunity Member
Berno, That did the trick. I had seen this before with "Print Results". I couldn't test it on my local computer before posting to our website, but once posted it worked. Thank you so much! Now I can test these things before I post.
Steve
Related Content
- 12 months ago
- 12 months ago
- 12 months ago
- 12 months ago