Re: <body onload="window.print(); window.close();">
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: <body onload="window.print(); window.close();">

From: Randy Webb <HikksNotAtHome@aol.com>
Date: Mon Dec 26 2005 - 13:50:42 CET

RobG said the following on 12/25/2005 11:51 PM:
> VK wrote:

<snip>

>> The only reason it works (sometimes!) in IE - is that IE as usual makes
>> extra step to try to understand user's intentions.
>
>
> Hardly. IE appears to do exactly what Firefox does - it waits for the
> outcome of the print dialog before proceeding with the script which
> would appear to be the logical thing to do.

IE6.0 Win XP SP2 with this code:

window.print();
alert('window.print complete');

I get that alert before I get the window.print window. So IE doesn't
wait for the outcome of window.print() to move on.

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Received on Tue Jan 3 03:55:03 2006