Forum Discussion
Print results from a scrolling panel - Javascript help
- 4 months ago
Hi Russell,
Thank you so much for your help—I really appreciate it! I’m encountering an issue with an image (logo.png as broken) in my JavaScript. It’s not displaying correctly during the preview or when prompted to download, which used to work fine before.
I’ve attached the SL file for your review. Could you please check if there’s a script I might have missed? I'm using the same JavaScript you shared previously.
Thanks in advance for your assistance! 😊
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.
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!
- RussellKillips-2 years agoCommunity Member
Hi Dean,
The screen shot that you sent me was for publishing for web. Instead publish for Review 360.
Extract the created Zip file. Copy over the logo and then re-zip. Then upload into your Review 360 account.
I have attached a short video.
- DeanBijis2 years agoCommunity Member
Hey Russell, I can't thank you enough for your help. You truly saved the day, and I'm extremely grateful.
- DeanBijis2 years agoCommunity Member
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 :)
- RussellKillips-2 years agoCommunity Member
Hello Dean,
The trick here is to use an html table. The header section of the html table (<thead></thead>) will automatically be included on every page.