Resetting the project after using a javascript trigger that goes to an external webpage

Oct 06, 2015

Hi everyone,

At the end of my quiz, if the user is successful they are shown a button that has a javascript trigger to take them to an external LMS to get their certificate. I'm wanting to then take the user back to the very first page after this but if the user goes back into storyline then it starts off from where it finished meaning they just have the button to activate the javascript again to get another certificate. The reason I want to do this is because I don't want them to just get another certificate after a year without redoing the whole module again.

Can anyone help? Do you need further clarification on my situation?



5 Replies
Ashley Terwilliger-Pollard

Hi Richard, 

What about modifying the state of the button once clicked? If you changed it to be in the "disabled" state the user wouldn't be able to click on it again. They'll need to leave that slide while in the course to have the slide's state saved (using the "resume saved state" slide property) so you could also set it to jump to a duplicate of that slide or similar, so that they are forced out of the slide and then the course to get the certificate. Someone may also have an additional Javascript element that they could share with you here - so hopefully they'll be able to pop in and share. 

Richard Wardingley

Hi Ashley and Phil,

It seems to be that any triggers I have on the same slide as the javascript, either before or after it on the trigger list, doesn't work in the way I'd expect it to. I have tried many different things, such as resetting to initial state, jumping to the first slide, or jumping to a different layer which it does and then the javascript triggers. However, when the javascript triggers it takes you out of storyline, and when you go back into storyline it takes you back to the final slide base layer before javascript activation, NOT the slide or layer that it should have finished on. Any triggers after javascript activation doesn't work as it takes you out of storyline, and any triggers before javascript activation haven't saved where they left off from when you go back into storyline. I'm not sure why it does this and not sure how to get around it.

Ashley Terwilliger-Pollard

Hi Richard,

Perhaps you could post a sample of this code and set up so that the community could take a look at your Javascript and offer some additional insight and advice? It's outside my wheelhouse in terms of how you may have set up the Javascript to leave the the community will be your best resource here. 

Richard Wardingley

Hi Ashley,

Unfortunately, I can't post it due to the company content. Even if I made it blank and just showed you the workings then it wouldn't help either as the javascript wouldn't work unless the file was published and uploaded to our company website. I can tell you that the javascript used in the trigger is:


This takes them to a feedback form on our website (so no longer in storyline) which then generates a certificate. The issue is when they come back into storyline, they restart where they left off and can click to get another certificate straight away without redoing the module. I need to get them to back to the beginning/reset the module if they complete the course, but I can't choose the 'never resume story on restart' option on the player as we need to be able to let them resume mid-course if they come out of it. The trigger options I've tried (described above) haven't work.

This discussion is closed. You can start a new discussion or contact Articulate Support.