JavaScript in Firefox

May 28, 2013

Hi,

I was trying out some JavaScript, and it seems the support in FireFox is lacking; the script worked fine in the player as well as in IE:

var player = GetPlayer();
var  myTopText = GetPlayer().GetVar("TopText");
var myBottomText = GetPlayer()r.GetVar ("BottomText");

if (myTopText == "A" && myBottomText == "B") {

 GetPlayer().SetVar("CheckAnswers", true);

};

This should evaluate two textfields on the slide, and change a variable if they are both correct. The changed Variable will trigger another layer to be opened.

FireFox seems to fail at retrieving the variable, as any alert boxes issued before that will work, nothing afterwards seems to run, though.

Any ideas? Settings I may be overlooking?

2 Replies
Phil Mayor

Not sure why you are doing this in javascript would be easy to do in storyline, try this there is a mistake on line 3 extra r

var player = GetPlayer();
var  myTopText = player.GetVar("TopText");
var myBottomText = player.GetVar ("BottomText");

if (myTopText == "A" && myBottomText == "B") {

player.SetVar("CheckAnswers", true);

};

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