window.print() works in Netscape 4 and 6, Explorer 5+ on Windows, Opera 6, iCab, Ice Browser and Hotjava 3, while WebTV says it supports the method but doesn't actually do something.
The VBScript on this page works in Explorer 4, 5 and 6 on Windows (though only 4 really needs it).
An often requested functionality is the Print link, with which users can print out a page. This can be very useful in framed sites when you don't want to explain to the user he has to click on the correct frame, then press "Print" etc.
As usual, you can try the script. I added my browser detect so you can keep track of which print was produced by which browser.
Since I'm going to rewrite this script later, I'll keep the explanation short.
This works in Netscape 4 and up, iCab, Hotjava and Explorer 5 Windows and up. The other browsers can't handle this, except for Explorer 4 on Windows (and, it is rumoured, Explorer 3). Here we use the VBScript to create an Object that holds an instance of the browser and give it ID="WB"
document.write "<object id=""wb"" width=0 height=0 classid=""clsid:8856f961-340a-11d0-a96b-00c04fd705a2""> </object>"
and then we call the function WB.ExecWB(6,1) which means print.
I'm still not entirely sure how this works, more news later.
When printing other frames in Explorer it is necessary to put the focus on them first: