print a document clicking on its link
-
how can print a document just clicking on its link,I searched a lot on google but getting methods to print open document/currnt document
modified on Friday, December 18, 2009 2:24 AM
Just give a link and on call a javascript fucntion onclientclick and in the js function you can give as window.print(); Refer this http://www.javascriptkit.com/howto/newtech2.shtml[^]
Naina
-
how can print a document just clicking on its link,I searched a lot on google but getting methods to print open document/currnt document
modified on Friday, December 18, 2009 2:24 AM
Hi You can use ajax. when the ajax response recived you can use this javascript code
var pp = window.open('', '','left=0,top=0,toolbar=0,scrollbars=1,status=1');
pp.document.body.innerHTML += cPrint;
pp.document.close();
pp.focus();
pp.print();"cPrint" is the document text.
Mohammad Khansari
-
Just give a link and on call a javascript fucntion onclientclick and in the js function you can give as window.print(); Refer this http://www.javascriptkit.com/howto/newtech2.shtml[^]
Naina