Problem using Java Script
Jun 12, 2018
Hi awesome community!
I'm new to this forum, yet have some experience using Storyline 360.
My problem is this:
I'm setting up a slide in a course which is supposed to trigger a JavaScript, to trigger a prefab email being set up for the user. I downloaded a template off the forum, modified it, and it works like a charm.
When I copy the slide and recreate the variables in the story I want to incorporate it in, it simply doesn't work. I have tried visualizing the variables (%Variable%
), to see that they change as they should, and they do.
I checked both publish settings are identical.
All in all: It's exactly the same thing, same variables, same slide, same script, same triggers, yet one works, and the other doesn't.
Does anyone know what I am doing wrong? :-)
This is my script:
var player = GetPlayer();
var email=player.GetVar("email");
var subject="Feedback";
var body_start=player.GetVar("notes");
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+escape(body_start);
win=window.open(mailto_link,'emailWin');
2 Replies
It magically started work all of a sudden, so never mind :D
Got to love a little magic, Gustav! If you get stuck again, reach out in the ELH as the community has a lot of experts in Javascript!
This discussion is closed. You can start a new discussion or contact Articulate Support.