JavaScript not working in SL 360

Jul 23, 2020

I have used Tracy Carrolls Freebie print_certificate many times with no issue.  I tried to make a new project and modified it slightly to have the user enter their name in a text entry field on the first slide vs. entering the name on the certificate slide (see the original certificate in the project).   When I start the published project, I enter the name on the first slide, take and pass the quiz,  see the results and then use a button to navigate to the certificate slide (if successful) and it displays the username from the variable [NameField] but doesn't show the date that is generated by the JavaScript when the timeline starts, which is supposed to store the date in the variable "DateValue".  I have not modified any of the JavaScript and copied it verbatim into the slide.  The only change made from the certificate slide from Tracy's example was to eliminate the text entry field for the username on the certificate slide.  The certificate slide %DateValue% will not populate.  The JavaScript appears to have some error and stops processing.  I never get to the printed certificate, because of the error, despite the HTML certificate file being in the folder.  I have no experience with JS.  I have imported Tracy's certificate slide in the project for reference to compare the JS.  Please see the attached files.  Can someone please take a look and see what I am missing?  This seems pretty straight forward, but I can't see any difference.  I have included the project file, folder with the published project, and the HTML certificate.

Thanks in advance...

BB

9 Replies
Bill Balzer

The name (variable) was supposed to be passed from storyline to the certificate.  "When I start the published project, I enter the name on the first slide, take and pass the quiz, see the results and then use a button to navigate to the certificate slide (if successful) and it displays the username from the variable [NameField] but doesn't show the date that is generated by the JavaScript when the timeline starts, which is supposed to store the date in the variable "DateValue".   The date value is just using the current date, but the name is an entry field?"

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