Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 14-05-2009
Member
 
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.
Reply With Quote
  #2  
Old 14-05-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
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>
Reply With Quote
  #3  
Old 14-05-2009
Member
 
Join Date: May 2008
Posts: 2,293
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>
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


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


All times are GMT +5.5. The time now is 02:59 AM.