Forum Discussion
Execute JavaScript trigger not working
Any help would be appreciated! My Execute Javascript trigger is not working. Here is my code (which has worked in the past:
// Step 1. Connect JavaScript to the Storyline variables
var player = GetPlayer();
var FirstName = player.GetVar("FirstName");
var LastName = player.GetVar("LastName");
var Email = player.GetVar("Email");
var CEONotes = player.GetVar("CEONotes");
var CEOSkills = player.GetVar("CEOSkills");
var CEOTeam = player.GetVar("CEOTeam");
// Step 2. The HTML Section - with the Storyline variables inserted
var contents = "<html><head></head><body style='width:650px;padding:20px;'>";
contents+="<div style='font-size:26px;font-weight:bold;margin-top:26px;margin-bottom:20px;'>Meet the Teams Activity</div>";
contents+="<div style='font-size:22px;font-weight:bold;margin-top:26px;margin-bottom:20px;'>Instructions - Print Your Answers to PDF and email to the instructor</div>";
contents+="<div style='display:block;border-width:1px';><hr/></div>";
contents+="<div style='font-size:16px;font-weight:bold;'>Student Information</div>";
contents+="<p>"+FirstName+" "+LastName+" "+Email+"</p>";
contents+="<div style='display:block;border-width:1px';><hr/></div>";
contents+="<div style='font-size:16px;font-weight:bold;'>CEO Job Skill Rating</div>";
contents+="<p>"+CEOSkills+"</p>";
contents+="<div style='font-size:16px;font-weight:bold;'>CEO Team Player Rating</div>";
contents+="<p>"+CEOTeam+"</p>";
contents+="<div style='font-size:16px;font-weight:bold;'>CEO Notes</div>";
contents+="<p>"+CEONotes+"</p>";
contents+= "</body></html>";
// Step 3. Open the document window, write the HTML contents, and open the print window
var myWindow = window.open("","Print","width=810,height=610,scrollbars=1,resizable=1");
myWindow.document.write(contents);
myWindow.print();