Results 1 to 8 of 8

Thread: Tab Content Script - Printing problem

  1. #1
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script - Printing problem

    Tab Content Script
    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    yesterday Tab sript got updated! and it's great! after evaluating over 10 different tabs, it's my favorite!

    However one feature i miss - and the tab script before could do (or simply don't know how to get around) is printing.

    When page is printed, I'd like to have content from all tabs printed on the same page.
    I have setup css sheet for print, (which worked with previous tab script easily) but nothing happens with this one

    any ideas anyone?

    thanks a lot!

    kris
    Last edited by kriskl; 06-30-2006 at 10:01 AM.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Yeah; I think that's because it has all the stuff there and only displays one at a time, but, when printing, it doesn't do as much with the javascript.
    You could try changing it so that when inactive the divs (those are the tabs, right?) are set to hidden. Do that by as an attribute, and it won't print any of them. Then you can use javascript to unhide then when you want one disaplayed.
    However, you will end up with a blank spot, not the one you're on.

    Basically... this is gonna be a pain... it's not designed to work like that, sadly.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thank you for reply!

    i'm javascipt dummy, i thought it was possible to make all tab contents visible with css,

    It display all of them in dreamweaver - when i use the print css

    it does not only work with browsers

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

    Just put this at the end of tabcontent.css:

    Code:
    @media print {
    .tabcontent {
    display:block!important;
    }
    }
    - John
    ________________________

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

  5. #5
    Join Date
    Jun 2006
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink

    Thank you John!


    This worked! you are a saviour


    kris

  6. #6
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    That's a great idea John, thanks. Updated tabcontent.css with it.

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

    Default

    Hi

    @media print {

    .tabcontent {

    display:block!important;

    }

    }

    this works fine with IE6 - But With Mozzila 3...it still does'nt does not display to print..
    Can you help with some solution which is cross browser compatible.

    Aarti

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

    You may be doing something wrong. By Mozilla, do you mean FireFox? Anyways, since this has already been incorporated in the script. Go to the demo page:

    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    with your FF browser. Do a print preview. You should see that all of the tabs are shown. I do in my FF Mozilla based browser (version 3.0.4).
    - John
    ________________________

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

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
  •