JavaScript for Storyline to change on webpage

Hey guys,

I'm having trouble trying to set this JavaScript up in Storyline to create easier experience for the user.  

What I'm looking to do is find a way, through JavaScript, to send or pull information from the web page to notify the Storyline presentation to go to a specific slide. In theory (at least in my head) you should be able to do this since JavaScript can pull system information like your system clock or LMS username information. If I could either gather information from the web page or push information from the web page into the presentation, I could set up variables that would change the slide to one that I specify.

I did get some advice with a JavaScript code from Steve Flowers before using:

var player=GetPlayer();
var slVariable=player.GetVar("fromSL");
var newValue=1;
player.SetVar("toSL",newValue);

But I'm not quite sure how to set this up within Storyline and what I would need to do on the webpage in order to create this function.  

The way the webpage (which is from our internal knowledge base) will be set up is it will have a specific article number assigned to it.  This article number will be in the HTML code as well as in the HTTP address.  On the page, the SL presentation will be embedded in the body of the page near the content.  So it will have information on the subject, the embedded player, then more information if needed.  

In the SL presentation, it will have a variety of different subjects and topics available so that the agents can access that information quickly from the tool.  These topics will also be in our knowledge base, with each subject and topic having it's own specific article number.  

What we would like to do is set the SL presentation up in each article that it references.  When the agent go to the article in the knowledge base, we would like the SL presentation to jump to that specific slide automatically when they open the article.  Each topic is divided into different slides so we won't have to worry about running into layer issues.  

If you need more information than this, let me know.  I should be able to provide you with almost any information that you may need other than specific information in the article and company information.  

Thanks, 

Jacob 

1 Reply