I have a JavaScript variable which holds an HTML page and due to the setup I need to extract everything between
I found this article surfing on the web which take a DIV id and shows it on a new page to print it;
function getPrint(print_area)
{
//Creating new page
var pp = window.open();
//Adding HTML opening tag with … portion
pp.document.writeln('Print Preview ')
pp.document.writeln('')
pp.document.writeln('')
pp.document.writeln(' ')
//Adding Body Tag
pp.document.writeln('');
//Adding form Tag
pp.document.writeln(', and
pp.document.writeln('