Go to DotNetFunda.com
 Online : 727 |  Welcome, Guest!   Login
 
Home > Articles > .NET Framework > Printing part of the page

Submit Article | Articles Home | Search Articles |

Printing part of the page

red flag  Posted on: 11/21/2008 11:04:06 PM by Patidar.shekhar | Views: 1266 | Category: .NET Framework | Level: Beginner


Printing part of the page.



function printPartOfPage(Div)
{


 var printContent = document.getElementById(Div);
 
 var windowUrl = 'about:blank';
 var uniqueName = new Date();
 var windowName = 'Print' + uniqueName.getTime();
 var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=0,height=0');

 //document.getElementById("button").style.visibility="hidden";

 printWindow.document.write(document.getElementById("table").innerHTML);
 printWindow.document.write(printContent.innerHTML);
 printWindow.document.close();
 printWindow.focus();
 printWindow.print();
 printWindow.close();
 
 document.getElementById("button").style.visibility="visible";

 return false;


}


If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Found interesting? Add this to:

| More



Please Sign In to vote for this post.

 
Latest post(s) from Patidar.shekhar

Latest Articles
Experience:1 year(s)
Home page:http://www.dotnetfunda.com
Member since:Thursday, September 25, 2008
Level:Starter
Status: [Member]
Biography:

Submit Article

About Us | The Team | Advertise | Contact Us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 9/3/2010 4:08:44 AM