Does anyone know what is going on with this issue? We use courses with this setup and have not come across this issue before now. I am testing a new course with this setup and came across this.
Adding to Matthew's comment, you can set up a local webserver (like XAMPP, for example) and run your output from that location, which is faster than uploading to an LMS and/or webserver during testing.
As well as adding the variable Michael mentioned above, try adding a semi colon to the end of each line as shown below:
var currentTime = new Date(); var month = currentTime.getMonth() + 1; var day = currentTime.getDate(); var year = currentTime.getFullYear(); var dateString=month + "/" + day + "/" + year; var player = GetPlayer(); player.SetVar("SystemDate",dateString);
10 Replies
Hi Melissa,
This is because you are testing the content locally. If you upload it to your LMS or server, you won't see that error.
Another option is to view the HTML5 output (by opening story_html5.html) as your JavaScript will work there as well.
Let me know if you need any further assistance.
Hi Melissa.
This is not an issue. Just a notification enhancement.
Adding to Matthew's comment, you can set up a local webserver (like XAMPP, for example) and run your output from that location, which is faster than uploading to an LMS and/or webserver during testing.
Hope this helps,
Alex
This is not meant to be used in an LMS, it is meant to be used outside an LMS.
Alright, so silly me. If I had just checked the Include HTML5 output it would have been fine?
I checked the HTML5 and I am still getting the same error. Using the content locally was not an issue with SL1, is this an issue with SL2?
We actually depended on this function for our some of our users.
Hi Melissa!
If you are publishing to the web - it needs to be viewed that way.
If you need this to work locally, you need to publish to CD.
Hi Leslie,
That did help. I was working on another course, and the Javascript is not reading. I have attached both files. What did I do wrong?
For starters, the Javascript refers to a Storyline variable "SystemDate" which doesn't exist in your project.
Hi Melissa,
As well as adding the variable Michael mentioned above, try adding a semi colon to the end of each line as shown below:
This may not have anything to do with the java, but I love using this site to preview my courses before they go on the LMS.
http://tempshare.articulate.com/