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

Hello, Russel! How have you been? It's been quite some time since we last caught up. I hope everything is going well for you.

I'm reaching out because I could use your expert assistance with the Javascript for this SL file. I've been trying to launch the print trigger using the RTL in Javascript, but it's not working as expected. I have a feeling that I might have placed the code in the wrong location. Would you be so kind as to review the code and help me identify the issue?

Your support and guidance are always highly appreciated!

Thanks so much.

 

Knowledge  E

Hi Russell, as always you're the best! Thanks so much. Just one more thing. The print trigger doesn't seem to launch the print preview box. I've tried it on both PCs but I just wanna check if the same applies to you too.

See attached recording.

Thanks a lot

Knowledge  E

Hey Russell,

I trust things are going smoothly. It's me again, reaching out with a query.

I'm curious whether it's feasible to capture both sliders and text entry submissions within the print trigger. I've scoured the community but haven't chanced upon a solution, so I thought I'd turn to you to see if JavaScript might offer a way.

For context, I've attached the SL file.

Much appreciated your insights in advance.

Best regards,

Dean

Knowledge  E

Thanks once again, Russell. Your support is truly invaluable. I'm sincerely grateful for your assistance, and I've also managed to glean new insights into working with sliders, all thanks to you!

However, there's one more matter I'm grappling with regarding the trigger. Specifically, when a user intends to maintain the slider at '1' without moving it at all, I'd expect the print preview to reflect the number '1.' Oddly, I'm encountering a result of '0.' I've attempted to rectify this by modifying the trigger's 'state - Normal' value to 1, yet the issue persists.

To provide more context, I've attached the updated SL file and a screenshot for your reference.

Once again, I'm deeply appreciative of your guidance.

Dean

Knowledge  E

Hello Russel! I hope all is well with you. I was wondering if you're aware of any free JavaScript whiteboard drawing tool that I can integrate as a web object in Storyline, allowing users to draw or create lines in my course. I gave Zwibbler a try, but it doesn't appear to be compatible and I couldn't find anything in the community unfortunately. Thanks in advance for your assistance.

Math Notermans

For drawing you need Canvas. As is Storyline doesnot add a <canvas> tag. But you can add that... and then use any wanted drawing library on it.
Here you can see how to add a Canvas element to Storyline.
https://community.articulate.com/discussions/articulate-storyline/can-you-draw-a-line-with-javascript-in-storyline-360

Next step would be finding a library that fullfills your needs. Something like this would work i guess.
https://lazybrush.dulnan.net/