Results 1 to 2 of 2

Thread: How to embed button window in print and save “lightwindow”?

  1. #1
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question How to embed button window in print and save “lightwindow”?

    Hello,

    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 ...

    Regards,

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,069
    Thanks
    44
    Thanked 3,216 Times in 3,178 Posts
    Blog Entries
    12

    Default

    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"):

    http://www.dynamicdrive.com/forums/s...566#post291566

    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:

    http://www.digitalia.be/software/slimbox2

    http://fancybox.net/

    http://www.no-margin-for-errors.com/.../#!prettyPhoto

    http://code.google.com/p/easybox/

    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.
    Last edited by jscheuer1; 01-13-2014 at 02:52 PM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Similar Threads

  1. Make a button trigger the javascript:window.print()
    By Robotculator in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 01-14-2013, 02:06 PM
  2. Replies: 2
    Last Post: 10-09-2012, 11:33 PM
  3. Save Button
    By rhodarose in forum PHP
    Replies: 4
    Last Post: 05-09-2011, 04:05 AM
  4. Using Cross-browser print button to print a different page
    By egghead2000 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 04-11-2008, 04:40 AM
  5. Javascript to Trigger Print/Save Images
    By KraftyDood in forum JavaScript
    Replies: 3
    Last Post: 12-15-2006, 06:37 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •