Explore the community Forums Lectora Lectora Questions & Answers Close pop-up OR print properly Reply To: Close pop-up OR print properly

#401111 Score: 0
Profile photo of Stan Miller
Stan Miller
Member
beginner
intermediate
LUC16 Attendee
wise owl
contributor
curious george
friend finder
LUC17 Attendee
38 pts
@smiller7502

Thanks for this, Math, but I have some concerns about this solution from a sustainability perspective. For one thing, out of three course designers here I’m the only one who knows JavaScript. And for another thing, this solution works for me only after I upload it to SCORM Cloud or the LMS; in Lectora’s Run and Preview modes, the popup opens blank, which makes it look broken, and in Preview in Browser mode of course the popup shows a 404, which makes it look even more broken. Sure, I could leave a note in the course saying it has to be uploaded to work, but that complicates troubleshooting.

Additionally, I can’t quite get everything to work. Here’s where I’m at now:

  • Button on page 1 calls JS openWindow(), popup opens.
  • Actions on popup change contents of some text boxes, print the page, and call JS window.opener.closeWindow(). This closes the course!

My closeWindow() function:

function closeWindow() {
 windowOpened.close();
 trivExitPage("page2.html");
 }