posted 15 years ago
Hi Simran,
Check the following steps;
=> Write the whole content in a div tag
=> Open a popup window write the contents into that window
=> Print the popup window
=> Close the popup window.
Sample javascript function will be like;
function CallPrint(){
var printContent = document.getElementById("txtDiv");
var Win4Print = window.open('','','left=0,top=0,width=500,height=500,top=301,left=365,resizable=1,status=0,toolbar=0');
Win4Print.document.write(printContent.innerHTML);
Win4Print.document.close();
Win4Print.focus();
Win4Print.print();
Win4Print.close();
}
Regards,
Y. Keerthi Sagar.