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

#401094 Score: 1
Profile photo of Math Notermans
Math Notermans
Member
contributor
intermediate
advanced
friend finder
junior moderator
advocate
LUC16 Attendee
LUC16
wise owl
curious george
129 pts
@mnotermans5114

Hi Stan, tried my idea and do think this works. Here is a Lectora Online .pkg with this solution. You should be able to simply import this in Publisher or Inspire and check the solution.

If not let me know and i convert it in the desktop version.
Basically to call a function on the parent window to close the popup this is used:
window.opener.closeWindow();

Where the function closeWindow() is defined in the mainpage.
//Stores our opened window
var windowOpened;

//Opens our Window

function openWindow() {
windowOpened = window.open(“popups_printingpopup.html”,”ChildWindow”, “height=600,width=300”);
}
//Closes the window
function closeWindow() {
console.log(“called”);
windowOpened.close();

}

 

Regards and have fun,
Math

This post has received 1 vote up.