View Full Version : How to embed button window in print and save “lightwindow”?

01-11-2014, 10:43 PM

I build a site with "Lightwindow 2.0" (http://www.p51labs.com/lightwindow/) and I would like to add two buttons next to the "Close" button at the top right of the window.

The first button is the one to print only the content of the "lightwindow" window. I already have a "css" for printing my main pages but I want the visitor can also print only the content of the "lightwindow" window.

The second is that button to save only the contents of the "lightwindow" window that it is a direct content or a content "iframe".

For information, the reason is that in my windows are coloring pictures for children and I would like to give parents opportunities to either print the coloring page present in the "lightwindow" window or save it to their PC print later.

Thank you in advance ...


01-13-2014, 03:37 PM
Are people still using that script? Anyways, in this thread to which I link you to the code for that (printing a selective part of a page in a "box"):


we worked with code for the printing part of that.

As for saving, an ordinary link to the image can be used as long as the user right clicks it and 'saves it as'. Or the image can be put in a .zip archive, most browsers will automatically save that when clicked. Anything more elaborate than that would require server side code to attempt to force a download on a left click. If you Have PHP available on your host, we can look into that.

For integrating this with Lightwindow, I would suggest using another "box" type script, one that's at least jQuery based. There are several good ones out there depending upon how much versatility you need:





There are many others.

If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.