Using JavaScript to change a web objects address -- need advanced help

May 19, 2015

I have five buttons that each open a lightbox slide with five different web addresses (in web objects). 

What I want is to have ONE lightbox slide that opens a web object (with any URL) and then executes javascript when the timeline starts that will replace the URL in the lightbox. The button has a trigger that sets the variable "Test" to the new URL. 

Here is a sample of the code I've tried:

var player = GetPlayer();
window.location.replace(player.GetVar("Test"));

Unfortunately, it doesn't work the way we want it to, it opens the new URL in the parent window, replacing Storyline. Not good... need it to open the URL in the lightbox web object, not the browser main window.

This way, I can have as many buttons as I want, without having a lightbox hard-coded for each button. My question: How do I replace the web address of the web object in the lightbox? Thank you all for your help! ACE

2 Replies

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