Thanks it was helpful i took a shot the other day but somehow ended up printing the viewed page. I've changed my to print the PNG instead when the PNG is clicked.
function toImg(chartContainer, imgContainer) {
var doc = chartContainer.ownerDocument;
var img = doc.createElement('img');
img.src = getImgData(chartContainer);
while (imgContainer.firstChild) {
imgContainer.removeChild(imgContainer.firstChild);
}
imgContainer.appendChild(img);
img.id = "updatesize";
updatesize = document.getElementById('updatesize');
updatesize.title="\"Right Click and Save As\" to download full-sized image";
updatesize.style.width="336px";
updatesize.style.height="237px";
updatesize.onmouseover = function() {
updatesize = document.getElementById('updatesize');
document.getElementById('img_div').style.width="560px";
document.getElementById('img_div').style.height="395px";
updatesize.style.width="560px";
updatesize.style.height="395px";
}
updatesize.onclick= function () {clickheretoprint(this.src);
}
updatesize.onmouseout = function() {
updatesize = document.getElementById('updatesize');
document.getElementById('img_div').style.width="336px";
document.getElementById('img_div').style.height="237px";
updatesize.style.width="336px";
updatesize.style.height="237px";
}
}
</script>
function clickheretoprint(stuff)
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,width=800, height=600, left=25, top=25";
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title></title>');
docprint.document.write('</head><body marginwidth="0" marginheight="0" onLoad="self.print()"><center>');
docprint.document.write('<img src="')
docprint.document.write(stuff);
docprint.document.write('">')