Help with JavaScript: Group multiple text variables and send it as an email
Hi everyone,
I have 7 slides in this course, each slide has one text input and a text variable to store this input.
In the last slide, display all 7 text variables to users, and let users send all text as an email.
I got everything working except for two bugs:
1. The default email client on my computer does not fire up if I write too many words, no matter if it's in one variable or spread words to multiple variables, maybe around 2500 characters. Does the variable have character limit?
Code below:
var player = GetPlayer();
var useremail=player.GetVar("Email");
var note1=player.GetVar("note1");
var note2=player.GetVar("note2");
var note3=player.GetVar("note3");
var note4=player.GetVar("note4");
var note5=player.GetVar("note5");
var note6=player.GetVar("note6");
var note7=player.GetVar("note7");
var subject="Questions";
var questions=note1+note2+note3+note4+note5+note6+note7;
var content="Hi,%0d%0A%0d%0A";
content+=questions;
var mailto_link='mailto:'+useremail+'?subject='+subject+'&body='+content;
win=window.open(mailto_link,'emailWin');
2. There is no line break between variables in the email body. Perhaps we have to rely on users to hit extra enter.
https://360.articulate.com/review/content/46b10788-a4a2-4abd-9b20-fb1899ab4451/review
Thanks a lot!