I want to be able to open that PHP file to auto-print (which can be done easy with onload="window.print"), but I'd prefer it if that page didn't actually "open on screen".
It doesn't matter if it must, but would be good if I could do it the way one does it with Windows, where you select a group of files, and choose print. It prints them without actually opening them up on screen.
Can it be done?
I tried a timeout onload too, but that didn't work.
Code: Select all
echo "<body onload=\"window.print()\">
<script language=\"JavaScript\" type=\"text/javascript\">
function winClose()
{
window.setTimeOut(\"window.close();\",10)
}
</script>
<body onload=\"winClose();\">";