I am trying to display strings in Adobe Captivate 9 text captions with JavaScript. I'm using a non-responsive project, and the below code always shows the first "br" tag for newline. If I'm to remove the "br" tags in userResults
then the "br" tag in topTenUsers
will be seen.
However, in a responsive project, the same code does not show any of the "br" tags.
Code:
var userResults = 'You placed at rank ' + myRank + ' with a score of ' + myScore + '<br>' + '<br>';
var topTenUsers = 'The top ' + numPlayers + ' users are: <br>';
var topTenMsg = userResults + ' ' + topTenMsg;
window.cpAPIInterface.setVariableValue(topTenVarName, topTenMsg);
What is the cause of this difference and how could it be avoided?