Crazy iFrames/JavaScript Problem

Jun 19, 2015

I have a Storyline variable, and based on the variable's value I need to open one of a set of web pages within Storyline. (Value A goes to Page A,Value B opens Page B, etc.)

Since the variable determines the URL I can't use the Web Object, so I had to use JavaScript.  Now my novice-level coding skills are showing!  As you can see from the image below, the iFrame I made appears in the parent window and behind the Storyline player.  

iFrame in parent window

Here is the code I'm using:

var player = GetPlayer();
var myGrade = player.GetVar("myGrade");
var myURL = "" + myGrade;
console.log (myURL);
ifrm = document.createElement("IFRAME");
ifrm.setAttribute("src", myURL); = 550+"px"; = 333+"px";

Can anyone suggest a fix?



1 Reply

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