Set Variable for Storyline variable from Web Object across different browser tabs

May 05, 2021

Hello. I have a storyline slide and a web object. There are buttons inside the web object that trigger javascript code to change variables on the storyline slide. For example the var value moduleone is changed to 10 when the button is clicked.

Here's the javascript code triggered by the button inside the web object:

<script>
function moduleone() {
var player = window.parent.GetPlayer();
var moduleone = 10;
player.SetVar("moduleone",moduleone);
}
</script>

It works great if the web object displays in slide. However I need the web object to display in a new browser window

I need the javascript code to pass the value of the variable moduleone to the player across different browser tabs via local storage, please.

Thank you so much.

Be the first to reply