HTML5 not working?

Apr 14, 2016

Hi there, 

                I am relatively new to storyline and I am trying to get a result sent to an email. I found a thread which used this code: 

var score = player.GetVar("Results.ScorePoints");
var email="kelly@mycompany.com";
var subject="Course Name Results";
var body_start="I've completed the Course Name 101 course with a score of ";
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_start+score;
win=window.open(mailto_link,'emailWin');

to send an email once the user passed the test, but said that it only works in the HTML5 link. When I click the HTML5 link, storyline does not open properly and all the screens are blank or blue and nothing happens. I tested online if HTML5 works well on my laptop and apparently the website rated it well and that it worked. I'm still not sure what all this means, any help would be appreciated. 

In the above code, I just replaced the email she used with my own. Is there anything else I would need to change? Thanks! 

This is the thread: https://community.articulate.com/discussions/articulate-storyline/no-emailing-quiz-results-in-storyline

 

2 Replies
Crystal Horn

Hey there Branavan.

When you say that you clicked the HTML5 link, are you doing that from within the published output folder?

If so, you would be viewing your project locally.  If you view an Articulate Storyline course on your local hard drive (or send it to someone else to view on their local hard drive), you'll encounter security restrictions from the computer, web browser, Flash Player, and network that'll cause various features of your content to fail. To properly test your published content and share it with others, upload it to the environment for which it was published.

This article describes how to view your content in it's intended environment and ensure that it works the way you want it to.

As far as the JavaScript coding, we can't provide support with that, but here are some best practices.

Michael Hinze

In addition to Crystal's suggestion, there is also a minor error in the Javascript. Any of the quiz-related 'Results.xyz' variables cannot be directly read in a script, they need to be passed into a 'normal' Storyline variable first. See attached a quick example with a revised script that works for me in both Flash and HTML5.

This discussion is closed. You can start a new discussion or contact Articulate Support.