1. Javascript code, put the following code in printContent.js file
function printSelection(node) {
var content = node.innerHTML
var pwin = window.open(”, ‘print_content’, ‘width=500,height=500′);
pwin.document.open();
pwin.document.write(” + content + ”);
pwin.document.close();
pwin.focus();
pwin.print();
pwin.close();
}
2. Calling the javascript function from a *.html page on client click of a control
“printSelection(document.getElementById(‘chartRenderArea’));return false;”
here, chartRenderArea is the id of the div tag.
Advertisement
