Can I expect javascript in a Storyline block to function when inserted into Rise?

Apr 13, 2023

Our team has an api that will accept information that is output using a javascript trigger in Storyline and bring it into an internal database. This has been tested and functions.

I was hoping to build this course in Rise, not Storyline. Can I expect the javascript trigger to still do its thing once the Storyline file has been created, published to Review 360, and then brought into Rise through a Storyline Block and published from Rise?

3 Replies
John Cooper

We use Storyline blocks in RISE with JavaScript triggers in them quite a lot - so the short answer is Yes...

BUT.... In many cases the JavaScript requires access to code which is included from a JavaScript library (to do things like open a pdf file or access a remote database). There are a number of ways that library can be included in the Storyline published file...

1. It can be accessed using a 'script' which is added to the story.html or index_lms.html file after the Storyline has been published.

2. The JavaScript library code can be loaded into a webobject which is then loaded from a new slide in the Storyline project (see the discussion here for more details):

How to add jQuery or anyother external Javascript Library to Storyline - Articulate Storyline Discussions - E-Learning Heroes

3. Some of the libraries can be loaded dynamically i.e. you can include a JavaScript command that accesses and loads the library you need at runtime.

Methods 2 and 3 don't require any amendment to the published code - so should work OK when the Storyline is published in a RISE course (we use method 3 and that does work - I can't see any reason method 2 wouldn't work - but I could be wrong!). But if your JavaScript code in the Storyline uses a JavaScript library - which I'm pretty sure it will - and the library is loaded using method 1 then there may be some work to do to get it to work.

Sorry, about the long answer - but you do need to know (a) does your JavaScript use an external library? If yes, then how is that loaded.

Hope that helps