Forum Discussion
SebastienGreffe
12 years agoCommunity Member
WebObject and Storyline Variable
Hi!
I have a problem, I need to use a webobject with my project, but my webobject needs some informations. So, I put them in variables in Storyline and now my problem is how I can give them in th...
SherriSagers-ca
3 years agoCommunity Member
Thanks everyone! I was able to use Jean-Guy's version to show a Smartsheet form inside a Storyline object. This is the code that worked for me:
var player = GetPlayer();
//This will work with the first iframe on the slide with the class name of "shown"
var iFrameId = document.getElementsByClassName('shown')[2];
console.log(iFrameId);
var src="https://app.smartsheet.com/b/form/12345";
var score=player.GetVar ("Score");
//Build the smartURL here > var fullurl = src + "?var1=" + value1 + "&var2=" + value2;
var fullurl = src + "?Quiz=" + score;
//Send the new smartURL to the web object
iFrameId.setAttribute('src', fullurl);