HELP - Javascript not functioning as it should in Storyline 360 v3.20

Nov 02, 2018

Hi Everyone. I'm hoping someone will be able to help me with a project I'm having trouble with.

This is a followup question to a post I submitted a few months ago and related to Javascript suddenly not working when I output a project in 360 v3.20. 

Here's a link to the original post https://tinyurl.com/ybdmmjpb 

I've created a learning unit where the learner is required to answer 'yes' or 'no' to a series of 11 questions. A checklist is created listing only the questions they answered 'no' to and they can print this checklist for future follow up.

I've used Javascript to build the text string that they can print on the final slide. So ideally the output would look something like this.

I had originally used the \n code to force a line break and after a reply from Steve Gannon (thanks Steve) - I changed this to <br> and all was working perfectly.

Now suddenly when I republish the project (360 v3.20) it's doing this and showing the <br> code and I've not changed a thing. 

HELP!

The published version using 360 v3.17 is fine so the original javascript is fine. I'm at a loss as to why it's now not working.

Here's the code I'm using (I'm new to Javascript so I apologise if my code is not very good) ;)

var player = GetPlayer();
let followUp1 = player.GetVar("followUp");
let firstNo1 = player.GetVar("firstNo");
var newList = firstNo1 ? followUp1 + "Check if I will be invited to meet the board informally" : followUp1 +"<br>Check if I will be invited to meet the board informally"
player.SetVar("followUp",newList);

Can anyone help ?

Cheers

Mark

3 Replies
Michael Anderson

If your code is the same and only a version upgrade made the change, then I would guess that Storyline variables were altered so that any characters (like html special characters) are displayed litterally rather than translated to their html equivalents.

In other programming environments this same technique is used to prevent malicious code from being entered by end users. I can't actually replicate your issue as I'm using Storyline 3. You might consider opening a support case if no one else replies here.

Mark Sant

Hi Daniel / Michael.

It's very odd - I asked a colleague to output the project in Storyline 3 for me - and it displays perfectly. When I output the project in Storyline 360 it doesn't.

I always export as html5 only. I've tried different browsers and the results are the same.

Oh well - at least I have a temporary solution - output all the files using Storyline 3.

Cheers

Mark

This discussion is closed. You can start a new discussion or contact Articulate Support.