Results 1 to 3 of 3

Thread: How to print iFrame content

  1. #1
    Join Date
    Jan 2009
    Posts
    110

    How to print iFrame content

    I want to get a print the content from an iFrame, whereas my Content of the iFrame is just another HTML Page.Earlier i was able to get printout by using window.print() method at that time everything was working fine.But now the print function of the current frame is not allowing me to get printouts.Can anyone help me out with this issue.

  2. #2
    Join Date
    Feb 2008
    Posts
    1,852

    Re: How to print iFrame content

    To get printout of content from iFrame you need to right click in the iFrame and select Print option this will print the page inside the iFrame or you can select click here to print.In the iFrame page also put this code too.

    Code:
    <a href="#" onClick="print(); return false;">click here to print this page</a>

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: How to print iFrame content

    Try to use the following code i am sure it will work for you.

    Code:
    <script>
    function iprint(ptarget)
    {
    ptarget.focus();
    ptarget.print();
    }
    </script>
    
    <body>
    <iframe name="theiframe" id="theiframe" width="500" height="200" src="some.file"></iframe>
    <input type="button" value="print iframe" onclick="iprint(theiframe);" />
    </body>

Similar Threads

  1. How to print content of a Multi column Listbox?
    By Bryant in forum Software Development
    Replies: 6
    Last Post: 27-07-2011, 11:48 AM
  2. Content blocker blocks content on certain sites with Opera
    By GiveNTake in forum Technology & Internet
    Replies: 5
    Last Post: 21-06-2011, 07:30 AM
  3. How do I print a folder content LIST not using "print screen"?
    By pushpendra in forum MS Office Support
    Replies: 3
    Last Post: 26-07-2010, 03:53 PM
  4. Print spooler hangs when trying to print from a shared print
    By Jisbomb in forum Windows XP Support
    Replies: 3
    Last Post: 27-07-2007, 10:17 PM

Tags for this Thread

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
  •  
Page generated in 1,750,173,656.97239 seconds with 16 queries