Can't get any Javascript to work in SL2 course

Jul 29, 2015

Hi everyone,

I may have gotten a little big for my britches and tried to add a few Javascript commands to my course without actually knowing anything about Javascript.   And now they don't work.  

Background:
I found and used this really excellent guide on how to Add a Completion Certificate to a Storyline file to add three Javascript commands to my course:

-       pull user name from LMS to display on a completion certificate

-       generate date of completion of course to display on a completion certificate

-       print certificate when clicking on on-screen button

None of them work.  Not when I publish to the LMS.  Not when I publish locally and view in Chrome or IE.  Even the print command which has less characters than my name!  

Is there a box that I may have missed clicking on?  Or something that changed from SL1 (which the truly wonderful guide was written for) and SL2 (which I created the course in)?  Do I need to turn around three times and spit?  I'll do it!

Thanks in advance for any guidance!!

16 Replies
Elizabeth Godwin

Hi Michael,

Thank you!!  The line break seems to have fixed everything except for the Print command.  

I can now get the print screen to load, but it shows a blank page in preview, not the certificate.  Has anyone run into this before?  Could it be that my browser is blocking the content somehow?

Out LMS (IBM Kenexa) will allow users to print a report of their scores and date of completion, but it looks terribly, so I'd love to avoid it!

Thank you again for the review!

S.  Dyson

I, too, have had nothing but difficulty with Javascript in Storyline. I've followed many eLearning tutorials verbatim and published to the LMS and to CD. I've never been able to get any Javascript to work in Storyline. I do have a little experience with coding & scripting, and understand the concepts and practices, but I'm not well versed in Javascript. Is there an obscure setup option or publishing setting that everyone seems to know but me?

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