Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Printing Problem


Message #1 by "miaoju luo" <luomiaoj@h...> on Thu, 28 Sep 2000 15:02:27 GMT
I am tring to print multiple-records(each record generate a page) continuely 
without bringing the print-dialog box in browser platform. The problem I am 
having now is:  When I tried it on NT with IE5.5 and WIN98 with IE5.0, it 
works, but not on NT with IE5.0 or Win95 with IE5.0. Is there anyway I could 
make it works regardless what operating system the computer is or what 
version of the browser is?

Here is the javaScript I put in my HTML page on how to do the printing:

<script language="javascript">
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"> </OBJECT>';
document.body.insertAdjacentHTML('beforeEnd', WebBrowser);
WebBrowser1.ExecWB(6,2);
//Use a 1 vs. a 2 for a prompting dialog box
WebBrowser1.outerHTML = "";
setTimeout("window.close()",3000);
</script>


Appreciate any help!


  Return to Index