screenshot div into new window and print
I have a div, with checkboxes in, which I want to be able to print.
I can open the div, and print, with the following code:
However, all the checkboxes are blank, no matter how many are ticked in the div before pressing the 'print' button I set up.
var prtContent = document.getElementById("main");
var WinPrint = window.open('', '', 'letf=0,top=0,width=800,height=900,toolbar=0,scrollbars=0,status=0');
Also, since this is unstyled, and I have custom checkboxes, how would I go about getting the images to print (if I put the css in, they display on the new window, but if I print the page they are missing?)
Thanks in advance,
Your code is just taking the raw HTML from your page and displaying it in a new pop-up window. It doesn't have any stylesheet associated with it so it's unstyled, and it won't reflect the user's checkbox selections.
Actually not hard to get the CSS in the new window, like I said I can do that. Was simpler to just cut out the new window and print the div I have.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)