Results 1 to 6 of 6

Thread: Printing iframe from DD Tabbed doc code

  1. #1
    Join Date
    Jul 2006
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Printing iframe from DD Tabbed doc code

    1) Script Title: Tabbed Document Viewer

    2) Script URL (on DD): Tabbed Document Viewer

    3) Describe problem:

    I have added the 'print' function to a tab in my Tabbed Document Viewer code.

    See:-
    http://myweb.tiscali.co.uk/design_jo...URGH/index.htm

    Having searched the code and forum sites around the net I can not get (or dont know how to use) the function to work correctly....the ability to only print what is showing in the iframe only........ in my case to exclude the header and menu.

    So... the print button is in the parent window but the content is in the iframe.....

    I think its something to do with this script which is a muliti iframe making the task more difficult ?

    any help most appreciated.

    Thanks
    John
    Scotland.

  2. #2
    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 could try (untested):

    Code:
    <li><a href="javascript:print();" 
    onclick="window.frames[0].print();return false;">Print</a></li>
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2006
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Thanks.....

    Works great in Firefox

    Continues to print the menu's as well in IE unfortunately.

    Much out there along the lines of this I found
    http://www.eggheadcafe.com/PrintSear...asp?LINKID=449
    But I can't seem to get any of it to work.

  4. #4
    Join Date
    Jul 2006
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    I dont know if this helps ?
    Firefox generates the top printing function box when you click the print button on my page.

    IE generates the bottom one.

    As fireforx prints correctly is there any chance of forcing IE to use the top type of printing 'console' ? I assume if IE did use the top one than it would also print fine...

    Or are these print consoles specific to the browsers ? and not a selectable part of the OS ?



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

    Anything involving iframe content is tricky to test locally, throw in printing, and it gets even trickier, at least for me as I rarely have my printer connected and hate to waste paper.

    I'm glad to see that my idea worked in FF. Now the problem in IE has nothing to do with what dialogue box it shows you. In fact, there may be no problem in IE, it may just be that you are still seeing an older cached version of the page. If so, clearing your IE browser's cache will take care of the issue.

    If not, we can construct a print only stylesheet so that only the content of the iframe has display. This will be a bit tricky, so I will wait until I get the results from you as regards clearing your browser's cache in IE first.
    - John
    ________________________

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

  6. #6
    Join Date
    Jul 2006
    Posts
    26
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Cleared the IE complete history cookies temp / form

    still printed the menu's unfortunately

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
  •