Launching email with variables in Storyline

Oct 05, 2016

My course contains two question blocks. On the final results page, the result score for each question block is displayed. The Send Email button uses the following JavaScript code:

Player = GetPlayer();
var SendEmail = Player.GetVar("SendEmail");
var Subject = Player.GetVar("EmailSubject");
var Linux.ScorePercent = Player.GetVar("Linux.ScorePercent");
var Virt.ScorePercent = Player.GetVar("Virt.ScorePercent");
var sBody = "Here are your results " + "\r\n";
sBody += "Linux OS " + Linux.ScorePercent + "\r\n";
sBody += "Virtualization " + Virt.ScorePercent + "\r\n";
sBody = encodeURIComponent(sBody);
window.location.href = "mailto:" + SendEmail + "?subject=" + Subject + "&body=" + sBody;

However, nothing happens when I hit the Send Email button in the browser. 

Is my Javascript incorrect? Is there something else that I'm missing?

6 Replies
Leslie McKerchie

Hi Claudine!

We want every feature in our software to work well. With that goal in mind, we've decided not to document Articulate Storyline system variables that could be accessed via JavaScript triggers at this time.
 
Storyline isn't currently designed to expose system variables for user interaction. As a result, JavaScript triggers that reference them could interfere with course playback.
 
We value your feedback and want to better understand your needs, so we can build even better software. Help us plan for the future by sending us your feature requests with specific system variables you'd like to see and examples of how they could be used.

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