Forum Discussion
Articulate Storyline: Export to Google Drive
Next step is adding a proper url so jQuery will be loaded.
Changing this on the first JS trigger...script.src = 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js';
And jQuery gets loaded...
But we now get another ( expected ) error in the console.
RULE 1: When working with Javascript. Use your browser console to check for errors !!!user.js:56 Uncaught ReferenceError: WEB_APP_URL is not defined
at user.js:56:6
This is a scope error. The WEB_APP_URL is defined in trigger 2, and called in trigger 3. But trigger 3 doesnot have any knowledge of the contents of trigger 2. Thats the way Storyline works. Every trigger has its own scope. Only way to work around that is having all code in 1 trigger... or using a global Javascript or using variables to pass variables along. The last solution im gonna use now.
The same scope mistake is made with the 'storyline' variable in your script. Always keep scope in mind in Storyline ! As the var storyline is JSON based data, im not 100% sure if we can sent that through Storyline variables...that are only strings. We will see...