I am doing a simple print option that when click I call a print function. The function copies over the relevant (not all of it) html.
function print() {
var printWindow = window.open("", "Print", "status=no, toolbar=no, scrollbars=yes", "false" );
var toInsert = $("div.book").html();
$(printWindow.document.body).html(toInsert);
}
The problem I have is that this new window doesn’t seem to be able to reference my css stylesheet or my pictures that are within the folder. Any ideas? Just focusing on the css issue, would it be possible to insert a <link ... /> into the head of the new window?
Thanks!
DEMO