Forum Discussion

CharlesMaragna's avatar
CharlesMaragna
Community Member
3 years ago

Execute Javascript on Exit of slide

I'm quite new to Storyline, although I have quite a bit of javascript experience. I've been working on a template which does almost everything I need, but, I really would like to update part of the course when the user exits a slide.

I can execute some code when the timeline ends, but, this isn't necessarily the same thing... 

Is there any way to add this kind of functionality?

  • Easiest solution i see without seeing a sample of what you exactly trying to achieve...

    Use Javascript and Storyline triggers to achieve exactly what you want.... when all is done... execute a Javascript to set a custom variable to 'True'.

    Add a trigger to exit slide or go to the next slide... only when the custom variable changes and is True.

    Kind regards,
    Math

  • Thanks for that Math - and apologies for the slightly vague nature of the query. The issue is that users can click on the next/previous buttons to move on, I would like to not interfere with that, but make some updates to ensure everything is left 'tidy'. (For a bit more detail, I add a listener that I want to remove.)