Javascript mail function worked fine in SL2, but does not work in SL360. Can anyone help?
Mar 13, 2017
Hi all,
Recently I upgraded from storyline 2 to storyline 360. A fantastic improvement! untill....today...when I found out that a javascript mail function I used in my storyline 2 file didn't work anymore in storyline 360.
the javascript I use is:
var email="fill in your e-mail adress";
var subject="subject";
var body_start=new Array();
body_start[1]=player.GetVar("QuestiononeIS");
body_start[2]=player.GetVar("Questionone");
body_start[3]=player.GetVar("QuestiontwoIS");
body_start[4]=player.GetVar("Questiontwo");
var body_txt=body_start[1] + body_start[2] + "%0D%0A%0D%0A" + body_start[3] + body_start[4] + "%0D%0A%0D%0A";
var mailto_link='mailto:'+email+'?subject='+subject+'&body='+body_txt;
win=window.open(mailto_link,'emailWin');
the javascript is linked to a button. So when user clicks, the javascript is activated and should open a e-mail window. However, it doesn't anymore. I tested it in IE11, Firefox latest version and Chrome latest version, and exported to LMS > HTML5 first with flash backup.
Can anyone please guide me in what I can do to fix the problem?
Thanks in advance! :)
Kind regards,
Marina
6 Replies
I would first check if the variables, e.g. Questionone are correctly populated in Storyline before the JS is called.
Good question, I checked the variables. Before upgrading to 360 it worked. In the meantime I didn't change anything (except plain text), but now the pop up doesn't work.
Is it possible it's an export setting?
I have noticed that converting a SL2 project into SL360 sometimes 'breaks' functionality. That's I suggested to doublecheck if after converting the variable were still working correctly.
tnx for the suggestion! I'll delete and re-enter the variables to be sure.
re-entering variables doesn't seem to work. However, exporting to flash first with html5 fallback instead of html5 first with flash fallback does seem to work. I'll retest the whole module to see if that doesn't bring up issues with other content.
I have the same problem. I changed my variables, published Flash then html5 with same results.
The variables display correctly on a page when collated in Storyline.