Forum Discussion
Print results from a scrolling panel - Javascript help
- 3 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 wanted to express my sincere gratitude for your assistance. Thank you very much for taking the time to help me out. Your support is greatly appreciated.
Once again, thank you!