I am trying using JavaScript to print selective Div in the page which include a chart using this code:
Quote
var printContent = document.getElementById('popupContact');
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=200,height=200');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
var windowUrl = 'about:blank';
var uniqueName = new Date();
var windowName = 'Print' + uniqueName.getTime();
var printWindow = window.open(windowUrl, windowName, 'left=50000,top=50000,width=200,height=200');
printWindow.document.write(printContent.innerHTML);
printWindow.document.close();
printWindow.focus();
printWindow.print();
printWindow.close();
where "popupContact" is the div element which includes the charts I want to print out ,,
When I do so,, the charts did not appear!!, but if I use print from file menu in the browser the chart appears no problem ,,
So please tell me how to handle it ??
Thanks
Homesick

Back to top
MultiQuote