Javascript that worked 4 months ago not working now

Apr 13, 2022

Hi, a few months ago I created a button that when a student clicks on it javascript is executed so that an email is opened (web version of outlook) and the email address, subject line and body are pre-populated (i.e. the student only needs to hit send and our staff gets required email). 

The button worked flawlessly as recent as 12/2021. Now after a recent storyline update the exact same button does nothing in the published versions. The version published a few months ago still works as it should. Did something change in the most recent update to interfere with javascript ?

This is the code that worked before and now doesn't work:
var player = GetPlayer();
var recipientemail = 'gdrj@asc.edu';
var subject = 'Feedback on New TechTalk Newsletter';
var body = 'I have the following feedback, comments, and suggestions for the TechTalk Newsletter.%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A%0D%0A';

var mailto_link = 'mailto:'+recipientemail+'?subject='+subject+'&body='+body;

win = window.open(mailto_link, 'emailWin');

 

Thanks for any help

 

Also staff please put in a request for an email button in storyline (as javascript seems to be problematic and unsupported)

5 Replies
Ron Good

To clarify, not working means when a student clicks the email button in the published version nothing happens. The mouse changes to acknowledge that the button is clickable but clicking on it seems to do nothing. In the previous versions clicking on the button would open a window with outlook email and the timeline in storyline would pause until the email window was closed.

 

My browser has not changed, and the previously published versions work as expected

Ron Good

another update, I just opened the original file from Dec 21 and re-published it using the updated storyline (April 22) and the original javascript executed buttons DO still work in the new publisher.

 

the javascript is the exact same code line for line in the working version and the non working version (in fact the new file was created from the original with a save as command)

is it possible execute javascript is somehow corrupt in the new file ? Everything else works as expected so nothing acts like a corrupted file.

I am confused. any help or thoughts would be greatly appreciated

Ron Good

Thanks for Checking Math, it turns out to be an interesting story - I was using Ctrl +V,C to bulk copy my code from one storyline file to the other. I have never had bulk copy and past fail to copy everything

Quick checking the script line by line it seemed perfect (plus I was certain the problem was related to storyline update, I complain several times a week that we are not still using Win7 and word 2012 :) )

But when I finally broke down and checked character by character it turns out my Ctrl + C,V left out a random single quote " in the middle of a line - I am still not sure how that is possible, I would think copy everything, paste everything - would mean everything not 99.99% of everything