Need to make a function that would open a popout with a div inheriting innerhtml from another div on that page.
For example, the initial div might have some sort of a table, therefor when the user presses the print button, this div would open in a new popout. 🙂
EDIT:
Thanks, got it working!
function opentrint( ) {
var $toprint = $('#divToPrint').html();
myWin=window.open('','myWin','menubar,scrollbars,left=30px,top=40px,height=400px,width=600px');
myWin.document.write($toprint);
}
use
var printwindow = window.open('file', 'uniqueid', 'width=400, height=300');to open a new window. That script that you’re calling in
fileshould be able to accessthe opener window by
var div = window.opener.getElementById('divid');It should be possible to wrap
window.openerin a jQuery object. You might even need touse
$(window.opener).contents().find('#divid');.