Print results from a scrolling panel - Javascript help

Apr 29, 2022

Hi everyone! 

I have an interactive Q&A that is quite lengthy so I inserted a scrolling panel to have a more compact look. Now I want to print the results of the whole document but I only know the basic JS print function that only captures the last two questions when I click the print button. Can you help me with the javascript to print a summary of answers? Attached is a story file for review.

Any suggestions and tips are appreciated.

Thanks a lot!

Dean

39 Replies
Knowledge  E

Hey Russell, thanks again for you help! Appreciate it very much.

Just wondering if it is possible that two separate interactive Q&As/storyline files can build on each other, so that at the end of the 2nd interactive, it prints out the results of the first interactive followed by the results of the 2nd interactive. Basically getting a review of everything that was submitted.
 
Attached is the storyline file of the first interactive.

Thanks so much! :)

Knowledge  E

Hello Russell,

How's it going? I hope you are doing well.

I need your advice/help on how to display the full text of a learner in the data entry field (see screenshot. The full sentence doesn't display on screen upon preview (so I'm guessing that gonna be like when uploaded as SCORM). Is there a way to make it dynamic and display all the text? Also how can I get rid of the Download button upon clicking download to print?

 

Thanks a lot!

Dean

Russell Killips

Hello Dean,

Try increasing the height of the text boxes to around 66px. The text should start to wrap then.

For the download button, Storyline 360 has a new Print Slide trigger.

When clicking the print button, you could have 3 triggers.

1. Set state of Download button to hidden.

2. Print slide

3. Set state of Download button to normal.

Knowledge  E

Hi Russel,

How are you? It's me again and I need your little help with the Javascript of this SL file. I'm having a little trouble having the texts with line breaks appear in the download/print window. Whenever I have two to three paragraphs, it will just capture everything in one single paragraph. I feel like I'm missing something.

THanks a lot!

Knowledge  E

Hello Russell,

How are you? Hope all is well.

Just wanted to check something with you if you have any idea why the screen behaves (see attached recording). I've also attached the sample SL file you've done for me previously.

Thanks a lot in advance! :)

Knowledge  E

Hi Russell,

Hope you're doing well.

I would like to learn how to print 2 slides in one document (1.15 and 1.16) At the moment, I only know how to capture/print one slide- See attached storyline file.
 
Appreciate your help on this.
Knowledge  E

Hi Russell!

Thanks again for this! I always forget but it works now thanks to you. however, my issue at the moment is the print trigger. The print dialogue box won't appear. I think there's something wrong with my code. Can you perhaps help me with this?

I've attached the SL file for reference.

Thanks so much in advance! :)

Best,

Dean

 

Knowledge  E

Dear Russell!

Hope all is well.

Can you help me with the Javascript to include an image as well as title header upon printing? Is it possible? If so, what javascript should I include in my current Javascript? See attached.

Thanks so much!

 

Russell Killips

Hi Dean,

Including an image is little bit more tricky.

The code needs to reference an image. In this case, the company Logo.

After publishing your course, copy the Logo.png into the output folder.

Take a look at the javascript code in the story file.

Code executes quickly. So the logo didn't have enough time to load before the print was called.

So, I used the setTimeout function. It waits 1000 milliseconds before calling the print function.

Hopefully this is enough time for the logo to load before printing. You may need to change it to 1500.

I have attached a zip file that includes the story file and the logo.

 

Include Logo

Knowledge  E

Hi Russell,

I hope you're doing well. I wanted to bring up another matter regarding the SL file with the logo. I attempted to upload the zipped file, but it seems that Review360 is not accepting or recognizing it. I would appreciate your assistance in identifying any missing steps or potential mistakes I may have made during the process. I have attached some screenshots for your reference.

Thank you so much for your help!

Knowledge  E

Hey Russell, I'm sorry for the inconvenience, but I'm facing difficulties in adding the same JavaScript code for the logo and header to this Storyline file, particularly to ensure they appear on each page while printing results over several pages. I've made several attempts, but unfortunately, I haven't been successful so far. I've attached the file for your reference. If you have any written instructions or guidance on how to achieve this, I would greatly appreciate your assistance. Thank you in advance for your help and apologies for the trouble :)