Using JavaScript to Print Text Entry Variables

I followed the advice given by another user ( but I just can't make it work! I want to take the contents of 12 different text variables and pull them into one printable file. I used the JavaScript given in the linked discussion thread and modified it to match the names of my variables, but it just won't work. 

I attached my Storyline file and a PowerPoint with the JavaScript given in the original post (linked above). 

4 Replies
Matthew Bibby

I haven't checked your file (as I'm away from my main computer) but just wanted to ask how you were testing your project? JavaScript won't work when testing the Flash output locally, so you'll need to upload your course to your LMS or web server, or test the HTML5 output for the JS to work... 

Matthew Bibby

I've fixed it up for you Madelaine. There were a number of issues, mainly due to missing semi colons and the use of curly rather than straight quotation marks.

FYI, when editing JavaScript you really need to use a code editor (e.g. Sublime Text) as it will help you avoid some of these issues. 

All the best.