Forum Discussion
Javascript in Storyline 360
I have this jarascript code in storyline, and I'm trying to eliminate the cc and bcc fields and customize the subject line to read: self-assessment results. Any help is greatly appreciated. I've been researching and trying different code, but given my limited knowledge of JS, nothing seems to work.
Player = GetPlayer();
var SendEmail = Player.GetVar("SendEmail")
var cc = Player.GetVar("carbonCopy")
var bcc = Player.GetVar("B_carbonCopy")
var Subject = Player.GetVar("EmailSubject")
var Primary = Player.GetVar("Primary");
var FirstName = Player.GetVar("Competing");
var LastName = Player.GetVar("Accommodating");
var StudentID = Player.GetVar("Compromising");
var StudentEmail = Player.GetVar("Avoiding");
var Student = Player.GetVar("Collaborating");
var sBody = "Your primary style: " + Primary + "\r\n\r\n";
sBody += "Competing: " + FirstName + "\r\n\r\n";
sBody += "Accommodating: " + LastName + "\r\n\r\n";
sBody += "Compromising: " + StudentID + "\r\n\r\n";
sBody += "Avoiding: " + StudentEmail + "\r\n\r\n";
sBody += "Collaborating: " + Student + "\r\n\r\n";
sBody = encodeURIComponent(sBody);
window.location.href = "mailto:" + SendEmail + "?cc=" + cc + "&bcc=" + bcc + "&subject=" + Subject + "&body=" + sBody;