Forum Discussion
Print button - javascript
Hi, I would like to add a button that would allow the user to print the page. It seems like the easiest way would be to add a trigger to a button to execute javascript. Unfortunately, I know nothing of javascript. Can someone help me out with what need to goes into that script box?
Thank you!!
- JimHandysideCommunity Member
thanks Nancy - that's the hang on this, works fine when run outside the network on web
- GrantRobertson1Community Member
Hi all. Just wondering if anyone else is having trouble using the print script in conjuncton with Firefox browser? Works fine in IE but comes up blank in Firefox. The file is posted to the web.
- GrantRobertson1Community Member
Hello again. I guess my question may not have been phrased in the best way, seeing as there have been no responses.
Are folks out there using Firefox and having success with the window.print() function from a Storyline course mounted on a website? When I run IE I get my printed page in portrait.
When I run Firefox (on a Windows 7, 64 bit system with the latest version of Flash [also taking away the protected mode] and Java), the page comes out blank.
Any clues about what I might do to make Firefox work for me?
Many thanks in anticipation.
- NancyWoinoskiSuper Hero
Hi Grant - I have the same setup as you Windows 7, 64 bit and I just created a little SL project that has a button with the javascript to print the page when clicked. It is nothing special but I published and tried running it locally using Firefox and it worked fine.
I tested it on Firefox version 15.0.1 and Firefox version 16.0.2 and it worked fine on both.
You say the course is mounted on a website so I am wondering if it is a firewall issue.
I have uploaded the storyline file that I used. I know it works so try it and see if it works for you. If it doesn't then there is some issue with your browser configuration or your network security.
- GrantRobertson1Community Member
Hello Nancy. Thanks so much for this.
Unfortunately, no joy on my side with this slide - at least I can go ahead and seek out the cause knowing that someone using a similar system has been successful! That's a great pace to start.
- GrantRobertson1Community Member
Hi Nancy, not at all a stupid question, but sadly, this is something that I had checked and yes, it is enabled. Still, unable to print the file you were able to print after quite a lot more time wasted.
In case others may have similar problems, what I have learned is that similar problems have been exprienced by others in the past both in Storyline (and this thread is an example) and also with Firefox and all sorts of programs more generally. It has to do with Firefox usually not liking to print windows via flash apparently. In fact, there is a public, unallocated bugfix request (and a whole lot of duplicate requests) for the Firefox team that goes back to 2002! Much teeth gnashing in the Firefox and other forums about this.
My work-around will be simply to warn users that the print feature works in IE but is not guaranteed to work in Firefox. I'll add ablank pdf to the Resources section which they could print out if the auto-print I've set up (and which works in IE) fails them.
Thanks again Nancy for your very kind and prompt support.
- TonyVicenteCommunity Member
Can you use this functionality to just print the slide and not the screen? Or maybe just the slide notes? I dont want a whole screen 'dump'. thanks
- DougBedingerCommunity Member
I too want to print only the slide. I tried the javascript option, and it works, but I'm getting 2 pages, not just the one with the print button. Thoughts?
- CajiRCommunity Member
Anyone know how to make the slide (stretch) fit to one page when printed? It's only using half of the page.
- ValCeolinCommunity Member
I was having the same problem Caji.
I reduced my certificate to the side where I can see the printed and after that my French version of the course is working. However, to the English version, even using the same story file and only changing the text to English, when I print the page, the certificate is being squeezed. :(
I only need to know how to print one slide to have a perfect course. Any ideas to solve this problem?
PS: My LMS works only on IE browser 7, 8 and 9.