Email content using javascript (Close window)

Jul 17, 2019

I'm using the below javascript to send an email from storyline. It works as expected,  but a new tab/window opens when the javascript runs.  How do I eliminate the new browser window from opening but still execute the javascript? All of our learners will use Outlook.

var player = GetPlayer();

var email=player.GetVar("useremail");

var subject="Voicemail Script";

var body_start=new Array();





var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start.join(" ");,'emailWin');


1 Reply
Valentin Levalet

Hello Aimee,

I didn't know Storyline could be use to do those all those javascript things! I browsed the web and find this:

So you have to replace the line,'emailWin');

by this window.location.href = mailto_link;

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