Forum Discussion
Javascript suddenly stopped working on Publish and Review 360
My JS worked fine while reviewing in 360, then suddenly stopped. Happened with my original publish file and further ones. I know the JS is being executed. I tested on my Desktop story file, and it does not work there either. Is this a SL glitch? Thanks for anyone who can help. Code below:
var player = GetPlayer();
var currentTime = new Date();
var hours = currentTime.getHours();
if (hours < 12)
{
player.SetVar("greeting","Good morning. Here are your learning objectives:")
};
if (hours >= 12 && hours <= 16)
{
player.SetVar("greeting","Good afternoon. Here are your learning objectives:")
};
if (hours > 17)
{
player.SetVar("greeting","Good evening. Here are your learning objectives:")
};
- JaceyLett-f2398Community Member
Just as soon as I wrote that, it started working again. Forgot to mention that I checked the code, and no red flags in the console for this JS. I know support is not provided for JS issues, but do any of you coders on here know what could have happened that had nothing to do with SL, Me, the code, Review 360, nor my browsers (checked on Chrome and Edge)? My Articulate is completely updated, btw. Could it be updates (not Articulate updates) that played a hand in this? I'm at a loss.