Forum Discussion
Can I expect javascript in a Storyline block to function when inserted into Rise?
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):
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
SUCH a helpful answer John, thanks so much!! I wonder if you'd mind connecting with me on LinkedIn or some such so that I could pick your brain about this later when we try? I'm betting there are thousands of John Coopers but my link is here: https://www.linkedin.com/in/fionamacelli/