When I do an email link, on a checkbox, it opens up another web browser window prior to opening up the email window. The person can send the email, but then they have this extra browser window to close also.
how do I stop that from opening up an extra browser window when it sends an email?
Here's some javascript that will close the extra window. The relevant lines are the last two:
var player = GetPlayer(); var email=player.GetVar("email"); var subject="My Subject"; var body_start=player.GetVar("notes"); var mailto_link='mailto:'+email+'?subject='+subject+'&body='+escape(body_start); emailwin=window.open(mailto_link,'emailWin'); emailwin=window.close();
Note: "email" and "notes" are variables set up in Storyline.
5 Replies
Good Afternoon, Beth.
I don't see a way to avoid the secondary browser window right now, although we always welcome new Feature Requests.
Good luck with your project!
Thank you Justin.
Can you think of any other way I could possibly do this, so the window doesn't appear? java script? or some "trick"?
Hi, Beth.
I'm not aware of another method, although there may be others in the community who are.
Here's some javascript that will close the extra window. The relevant lines are the last two:
var player = GetPlayer();
var email=player.GetVar("email");
var subject="My Subject";
var body_start=player.GetVar("notes");
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+escape(body_start);
emailwin=window.open(mailto_link,'emailWin');
emailwin=window.close();
Note: "email" and "notes" are variables set up in Storyline.
Thanks, Joe. Always helpful to see those Javascript examples.
This discussion is closed. You can start a new discussion or contact Articulate Support.