Forum Discussion

TinaBridson-1d5's avatar
TinaBridson-1d5
Community Member
2 years ago

Javascript to email results from a storyline 360 course quiz.

Hi 

I am publishing in Review 360 but the code below doesn't generate any email. I would appreciate any tips on what I am not doing correctly as I admit to not be an expert in Javascript in Storyline 360.

 

var email = "yourAddress@email.com";

var subject = "Sample Quiz";

var body_start = "I have completed the course with a score of ";

var score = player.GetVar("Results.ScorePercent");

var mailto_link = 'mailto:' + email + '?subject=' + subject + '&body=' + body_start + score;

var win = window.open(mailto_link, 'emailWin');

  • You cannot pull built in results scores directly, assign to a different varaible and try that. I haven't looked at the syntax that what jumped out first.

  • Ok, I did think that was the case after much trialling, thank you for confirming.