JessicaDavis-37
3 years agoCommunity Member
Storyline - Printing Learner Text with Javascript - Question
Good afternoon, all!
I'm working on a learner reflection.
2 Problems with the Javascript that I would appreciate guidance on!:
Problem 1
When the user clicks "Print" a small window opens with just the text. Which is good, I don't want the whole window to print.
However, when the learner has reviewed the to-be-printed text and clicks "Print Reflection" the ability to actually print does not materialize. How can I fix this so the learner can save their work?
Problem 2:
When I add the full question text to be printed along with the user's answers the initial print window for the user to review the text to be printed won't open at all.
For example,
Instead of:
- contents += "<div style='height:20px;padding:10px;margin-bottom:20px;text-align:center;'><button onclick='javascript:window.print();'>Print Reflection</button></div>";
contents+="<div style='font-size:20px;font-weight:bold;margin-top:10px;'>Module 1 Reflection</div>";
contents+="<div style='font-size:18px;font-weight:bold;margin-top:10px;'>Question 1</div>";
contents+="<div style='font-size:17px;margin-top:5px;'>"+modulereflection1+"</div>";
I would like Question 1 to be replaced with
- contents+="<div style='font-size:18px;font-weight:bold;margin-top:10px;'>Question 1- List 1-3 Level 5 leaders that you look up to. What can
you learn and apply from their leadership example?</div>";
Any tips?