Printing all contents of Iframe

Discussion in 'Software' started by lebohang, Mar 4, 2009.

  1. lebohang

    lebohang

    Joined:
    Mar 2, 2009
    Messages:
    2
    Hi all,

    I currently have a script that prints an Iframe from a different frame and it looks like this:

    </span><span class="style4"><a class="style2" href="printFrame">
    <span class="style6">Print current report</span></a></span>

    <script language="javascript" type="text/javascript">
    function printFrame() {
    parent.frames['mainpage'].window.frames['pageframe'].focus();
    parent.frames['mainpage'].window.frames['pageframe'].print();
    }
    </script>
    where 'pageframe' is my Iframe and 'mainframe' is the frame where the iframe is sitting.

    The problem is that the script only prints the contents of the iframe that is currently showing on the screen-and not everything that's on the iframe.

    Can anyone tell me how I can make this print all the contents of the iframe.

    Any help will be much appreciated.

    Thanks in advance.
    lebohang, Mar 4, 2009
    #1
    1. Advertising

  2. lebohang

    AGN

    Joined:
    Jan 25, 2011
    Messages:
    2
    iframe.print()

    my iframe is sitting in a window only,and i can't print pdf using iframe.print() code in IE.please give me a solution to this problem.
    AGN, Jan 25, 2011
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. stunbunny

    IFRAME and Video

    stunbunny, Dec 3, 2007, in forum: General Computer Support
    Replies:
    0
    Views:
    743
    stunbunny
    Dec 3, 2007
  2. Dany P. Wu
    Replies:
    6
    Views:
    1,848
    Lawrence D¹Oliveiro
    Nov 18, 2003
  3. pratima
    Replies:
    2
    Views:
    2,066
    ProgTalk
    Feb 2, 2008
  4. eyal1234
    Replies:
    1
    Views:
    1,358
    sjk123
    Jul 22, 2008
  5. lebohang

    print all the contents of the iframe

    lebohang, Mar 4, 2009, in forum: The Lounge
    Replies:
    0
    Views:
    2,891
    lebohang
    Mar 4, 2009
Loading...

Share This Page