Last active
July 8, 2019 01:46
-
-
Save fazlurr/158f7d44c674c71971634ee7126dd78d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function printcontent() { | |
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; | |
disp_setting+="scrollbars=yes,width=300, height=350, left=50, top=25"; | |
var content_vlue = document.getElementById("content").innerHTML; | |
var w = window.open("","", disp_setting); | |
w.document.write(content_vlue); //only part of the page to print, using jquery | |
w.document.close(); //this seems to be the thing doing the trick | |
w.focus(); | |
w.print(); | |
w.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment