10 Replies
Matthew Bibby

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.

Matthew Bibby

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:

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);