Is it only failing to work in a popup window? As far as I know what you have should work and I don't know why the window being a popup should matter. Is it just doing nothing when you click it?
Yes, it does nothing and only fails inside the popup. The page is built inside a jsp and the popup windo is called with a function.
function printChart()
{
var pwin = window.open("print.htm","","height=460, width=460, toolbars=no, menubar=no, resizable=yes"
var data = "<%=html%>";
pwin.document.writeln(data);
//pwin.print();
//pwin.close();
}
There is also a print button and that is what fails. I would really like to comment out the two lines above and have it close automatically after the user prints, but it just closes the window.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.