Forum Discussion
Using Dev Tools with Storyline
Howdy, I am trying to determine what the storyline variables using Dev Tools. I have tried var player = GetPlayer(); and I get an error "GetPlayer is not defined". I try window.GetPlayer(); and I get "window.GetPlayer is not a function". I have javascript working fine inside storyline but just want to pull variables at different times in course and don't want to add debug text in the course. I have a course that opens another storyline course and when I use Dev Tools on the other course and the window.GetPlayer() works perfect. Why can I not connect with the parent course?
What am I doing wrong. Please help.
Hi Tracy - it's possible that your DevTools console "JavaScript context" is in the wrong window.
At the top of most Consoles, there's a dropdown where you can select the context of the window you want to interact with, and especially when working with embeds, sometimes you have to manually switch to the window containing your project (look for story.html).
Typically, if you right-click > Inspect pages the console will take you to the proper context. But since most of the Storyline stage disables right-click, you often have to manually select it; either through the dropdown, or the element inspector where you can then select your Storyline stage which switches to that context.
This may not be the issue, but it's a common one for me.
- TracyCowanCommunity Member
I have a scorm cloud version: https://app.cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=1fac1d1b-0560-4723-ab15-6a7d866c0e46
My goal for this course is to use local storage variables to update storyline variables so I can bookmark where in the module someone closes the browser. course1 published files are placed in the story_content folder of the bookmark published output.
- MathNotermans-9Community Member
Do share a sample. Easier to debug.
- MatthewKliewerCommunity Member
Hi Tracy - it's possible that your DevTools console "JavaScript context" is in the wrong window.
At the top of most Consoles, there's a dropdown where you can select the context of the window you want to interact with, and especially when working with embeds, sometimes you have to manually switch to the window containing your project (look for story.html).
Typically, if you right-click > Inspect pages the console will take you to the proper context. But since most of the Storyline stage disables right-click, you often have to manually select it; either through the dropdown, or the element inspector where you can then select your Storyline stage which switches to that context.
This may not be the issue, but it's a common one for me.
- TracyCowanCommunity Member
Thank you so much. That worked. I was in the wrong window.