Unable to grab variable content in embedded SL file using JavaScript

Hi all. I have an external JS script that is using player = window.parent.GetPlayer(); to get the player and variable content from Storyline in order to generate a PDF. When I run this is SL directly, I have no problem seeing the variable content in the generated PDF file. However, if I embed the SL file as a Rise Storyline block, the PDF is generated without issue but no variable content is passed. I believe this has something to do with the fact that the SL file needs to reside in Articulate Review in order to be embedded and then some kind of frames in frames and security issues. I've tried various browsers and private modes to no avail. Does anyone have a suggestion on what might be preventing me from accessing variable content this way? Is there any way to directly embed an SL file into Rise without having to first host it in Review?

5 Replies
Matthew Bibby

Are you testing the Rise output in Review also? I wonder if it's a cross-domain issue. 

If you can share an example, I might be able to figure it out. Otherwise, I reckon Zsolt would know if this is possible, he's got a better understanding of this stuff than I do.

Edit, there might be some info here that helps figure this out.

Stephanie Harnett

Thanks Matthew. I figured it out but also read Zolt's article that was quite interesting. Anyway, turns out I needed to refresh the slide where text entry items were located before executing the JS to generate the PDF. If a text entry field was empty and I typed something in the field then  clicked a button to generate a PDF, the field remained empty in the PDF. However, if I reloaded the slide or went to another slide and then clicked the button, the variable information passes correctly to the PDF from Storyline, Review and Rise.    : )