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

Jul 07, 2018

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

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 looks it looks something like this.

It all worked perfectly in Storyline 360 version 3.12 but in version 3.17 - it displays this (without the line breaks).

I'm using the Javascript below to add a carriage return to the list as long as it's not the 1st item. (I'm a total novice when it come to Javascript btw)

var player = GetPlayer();
let followUp = player.GetVar("followUp");
let firstNo = player.GetVar("firstNo");
var newList = firstNo ? followUp + "Am I eligible to be on the board ?" : followUp +"\nAm I eligible to be on the board ?"
player.SetVar("followUp",newList);

So it seems the \n code to force a line break isn't working.

Does anyone know why this might be happening and/or  a workaround to this?

Attached is the source file with just 4 of the 11 questions if anyone wants to look closer.

Thanks,

Mark

2 Replies

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