I am a novice at JS. Can anyone make this javascript open Outlook, send an email to a specific mailto: address, so learners can ask questions?
Here is my current JS
var player = GetPlayer(); var email=''; var subject='VCI Complaint Management Question'; var feedback=player.GetVar('MyQuestion'); var emailBody = +feedback var mailto_link='mailto:'+email+'?subject='+subject+'&body='+encodeURIComponent(emailBody); win=window.open(mailto_link,'email@xxxx.com');
I'm not in a position to test your script, but one thing comes to mind. If it isn't working at all (you didn't say what is happening,) you might consider changing ' to ". There have been reports of SL having problems with changing ' to something that doesn't work.
Also, if you are using Outlook as a generic term to mean email app, fine. But if you want Outlook specifically, the mailto command opens the default email, and is under the control of the settings on the learner's computer, not yours. See Maria's first post in this thread:
8 Replies
I'm not in a position to test your script, but one thing comes to mind. If it isn't working at all (you didn't say what is happening,) you might consider changing ' to ". There have been reports of SL having problems with changing ' to something that doesn't work.
Also, if you are using Outlook as a generic term to mean email app, fine. But if you want Outlook specifically, the mailto command opens the default email, and is under the control of the settings on the learner's computer, not yours. See Maria's first post in this thread:
https://community.articulate.com/discussions/articulate-storyline/javascript-for-sending-storyline-360-text-entries-via-email
Are you getting any errors in the console?
Nothing happens when I run the js. Computer screen just remains the same.
Open the console to see if it throws an error
Sent from my iPhone
try
result:
https://360.articulate.com/review/content/f30e9e0a-7c08-4180-bea3-b99aa966e36d/review
Thank you Jürgen!
However, this did not work. This opens google and I need it to open MS Outlook. Any suggestions?
It will only open the email client that is set as default on your machine, you cannot specify the client.
Sent from my iPhone
Thank you!