Forum Discussion
ShellyBlair-3b0
4 years agoCommunity Member
Javascript question
Hi - I am trying to write a javascript that allows learners to email notes from a Storyline course. I found a post with an example of a similar project, and tried copying that script, but it didn't...
MariaCS
4 years agoStaff
Hi, Shelly.
Thank you for sharing your .story file!
I looked at your project, and while I'm not super familiar with Javascript, I noticed a few lines missing from your code. The project seems to work now after the changes below:
var player = GetPlayer();var email = player.GetVar("TextEntry");var subject="Full Item Spec Sheet";var thoughts1 = player.GetVar("Thoughts1");var thoughts2 = player.GetVar("Thoughts2");var thoughts3 = player.GetVar("Thoughts3");var body_start = thoughts1+' '+ thoughts2+' '+thoughts3;var mailto_link = 'mailto:' + email + '?subject=' + subject+'&body='+body_start;win=window.open(mailto_link,'emailWin');
I hope this helps!
ShellyBlair-3b0
4 years agoCommunity Member
Thanks so much! I knew I was missing something small, but couldn't figure it out. I really appreciate your help.
Related Content
- 2 months ago