Results 1 to 7 of 7

Thread: Lightbox image viewer 2.03 Mod

  1. #1
    Join Date
    Jul 2005
    Posts
    67
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Question Lightbox image viewer 2.03 Mod

    1) Script Title: Lightbox image viewer 2.03

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem:

    Hello, I was wondering if its possible to add a Print Image to the left of the Close image.

    It would be great if once Print is clicked, the windows Print Dialog box appears.

    Your help would be greatly appreciated.
    Thanks.
    Martin

  2. #2
    Join Date
    Feb 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox 2.03 Print Help

    1) Script Title: Lightbox image viewer 2.03

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem: I am having a problem with the print feature that I have added to my lightbox. The print button works but it prints the whole page as opposed to just the image in the lightbox.

    Here is the code that I used:
    rel="lightbox" title="Caption <a href='javascript: window.print();' > Print </a>"

    How can I have it just print the image instead of the whole page?

    Thanks in advance,

    Eric

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Add this stylesheet link:

    Code:
    	<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
    	<link rel="stylesheet" href="css/lb_print.css" type="text/css" media="print" />
    contents of lb_print.css -

    Code:
    html, body {
    display:block;
    }
    body * {
    display:none;
    }
    #lightbox,
    #lightbox #outerImageContainer,
    #lightbox #outerImageContainer #imageContainer,
    #lightbox #outerImageContainer #imageContainer #lightboxImage {
    display:block!important;
    opacity:1.0!important;
    }
    - John
    ________________________

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

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ANM238 (04-30-2008)

  5. #4
    Join Date
    Apr 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Red face

    Hi,

    No one seems to have answered the question of the guy who started this thread.
    When someone says:

    Here is the code that I used:
    rel="lightbox" title="Caption <a href='javascript: window.print();' > Print </a>"
    What do they mean? What file is this? What line is this? Is that the only code?
    Thanks
    Last edited by okstated; 04-21-2008 at 04:56 AM.

  6. #5
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    There saying that thats what they used on there image(I think the image). For an extension.
    Jeremy | jfein.net

  7. #6
    Join Date
    Apr 2008
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    Thanks Nile

    What file is this? What line is this? Is that the only code?

    in lightbox.js what must I alter to create a print link for the image?

    I've searched and found discussions on css for printing, but no one makes it clear how they actually inserted the link in the first place.

  8. #7
    Join Date
    Apr 2008
    Posts
    1
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by okstated View Post
    Hi,

    No one seems to have answered the question of the guy who started this thread.
    When someone says:



    What do they mean? What file is this? What line is this? Is that the only code?
    Thanks
    Allow me to amplify what the poster in post #3 above added:

    1. Create the stylesheet lb_print as instructed in Post #3 and link to it in the HTML head
    2. Now, in your link to open the light box image thus:
      Code:
      <a href="images/image-1.jpg" rel="lightbox" title="my caption - click to print" rev='javascript: window.print();'>image #1</a>
      The code shown in red is what will print your image based upon the css in lb_print.css


    This will print only the light box image and not the entire page.
    Make sure you are using lightbox 2.03a

    Hope that helps!

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
  •