Javascript no longer working

Jul 16, 2015

Hi all,

This used to work but not sure what changed.  I would have an object in the slide that when clicked would go to a PDF (or web site).  If the user did not click the button, my simple Javascript would alert then to click on the object and view the document before proceeding (when they clicked the Next button).  

Here is the Javascript code:

alert("Please view the document.");

Used to work like a charm, haven't changed anything, just stopped working.  I'm using Storyline version 1 and yes, it's online.  When previewing on the hard drive, Storyline does recognize the Javascript and alerts that it is not active when previewing.  That's the weird part.

 

Thanks in advance,


Scott
Digital Design Studio
West Los Angeles College
check out our blog - www.westladigital.com

 

11 Replies
Jerson  Campos

If you are hosting it on a local drive, most modern browsers will not execute any javascript code. This is done to protect the user from malicious codes.  If it was working before on a local drive and now it doesn't, then maybe the browser was updated or the settings were changed.  

If you were hosting it on a site and it no longer works, then something else is the problem?  Where any changes made to the SL file and then published.  The way SL stores user javascript code is it places it all in one function. If you added any other javascript code in any other place and there is an error in it, then none of the javascript will work. So you'll have to check all your code.

If your are hosting it on a site, nothing was changed, and it just stopped working. I would check if uploading the original files again will fix the issue. If not, you may need to speak to your hosting provider.

Ashley Terwilliger-Pollard

Hi Chris,

This discussion is a bit older - so I'd want to know what version and update of Storyline you're using? Javascript isn't something we can offer support for (the code itself) so I'd also suggest sharing the code that isn't working here with the community so that they could take a look and offer any ideas. 

If you think something changed in Storyline as the code worked previously, we can also take a look at that - and it'd be something I'd suggest doing in a Support case. You can use that link to share your files with our team or I can start a case for you. Just let me know! 

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