Storyline skipping Javascript triggers?
Feb 18, 2014
I've had this experience a couple of times with this one interactive-I set it up with javascript triggers, they work for a little while, and then the next day they don't work. Yesterday when this happened I remade the file pretty much from scratch. Again, the Javascript worked. Then today it didn't. I'm testing it on Tempshare, so it shouldn't be a security issue, and I don't think it's a cache issue because i've redone the triggers a number of times and republished them. I've also tried using the same triggers in a new file and publishing that-the triggers themselves work. I can't face re-creating the file from scratch again, and I don't think having to do that every day is going to do much for my productivity. Anybody have any ideas why this might be happening/how I can fix it? (I should also say that the regular triggers seem to be working OK, just not the Javascript ones).
3 Replies
Hi Chana,
I'm not a javascript expert, but wanted to first point you to a helpful article on Javascript best practices. You may also want to share the Storyline file here so that any community members could take a look at how you've set up the triggers to see if they can determine what could be causing the issue.
I figured it out. Turns out that if there are syntactical or other errors in your Javascript, Storyline will just skip all the Javascript triggers. (from the SL user's perspective, Javascript is input in little discrete chunks in the triggers, but the program doesn't read them that way). I figured it out by using the Web Console on Firefox-it will show you the errors one by one and you can fix them, although it involves a lot of zipping and re-dragging into tempshare to check. What really threw me off was that the first "error" wasn't really an error-I "fixed" it by copy-pasting the exact same code into the trigger again. but if you have Javascript triggers and SL starts to ignore them, you should check in Web Console or a similar program.
Thanks Chana for the update and I'm glad you were able to figure it out!
This discussion is closed. You can start a new discussion or contact Articulate Support.