Java script is not running

Jan 28, 2014

My Java script just quit running in my storyline project any ideas? Anybody?

9 Replies
Steve Flowers

Hey Kevin - 

Something could be throwing an error and keeping JS from running. In Chrome, hit CTRL-SHIFT-J to open up the JavaScript console. Any errors will show up there.

If it's a matter of a custom JS trigger not running when publishing to Flash, you might be running into a security issue. Try running it from a web host or publishing to CD and running in the EXE wrapper to see if the symptoms change.

Steve Flowers

Hey Kevin - 

I can see why it's shutting down JS but there are a few other problems with the script. In the GetVar() calls. A strange character appears. Change that to a single or double quote.

var userEmail=GetVar(“emailFromStoryline”);
var userScore=GetVar(“scoreFromStoryline”);

You'll also want to use quotes around your email address AND add mailto. I've made the link construction into a single line. It looks like you're not using the userEmail or userScore variables in your email link. Did you mean to?

var player=GetPlayer();var userEmail=GetVar("emailFromStoryline");
var userScore=GetVar("scoreFromStoryline");
//construct the linkvar link= "" + encodeURI("Course Completion")+"&body=" + encodeURI("TQIP 2014 course is complete.");
window.location.href= link;

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