amd
11-01-2004, 06:28 AM
I am using IE and i would like to print without printing dialog box. How can i do that.
I got this code online but it is not working not sure why
==========================
<script language=JScript>
function doprint() {
document.body.insertAdjacentHTML("beforeEnd", "<object id='idWBPrint' width=0 height=0 classid='clsid:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
idWBPrint.ExecWB(6, -1);
idWBPrint.outerHTML = ""; }
</script>
===============================
===============================
==================================================
======
Here is my html code.
----------------------------------
================================
<html>
<head>
<script language=JScript>
function doprint() {
document.body.insertAdjacentHTML("beforeEnd", "<object id='idWBPrint' width=0 height=0 classid='clsid:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
idWBPrint.ExecWB(6, -1);
idWBPrint.outerHTML = ""; }
</script>
</head>
<p style="margin-top: 0; margin-bottom: 0" align="center">Print test</p>
<INPUT type="button" value="Print Page" onclick="doprint()" ;></FORM>
</body>
</html>
==================================================
========
Thanks for your time...
I got this code online but it is not working not sure why
==========================
<script language=JScript>
function doprint() {
document.body.insertAdjacentHTML("beforeEnd", "<object id='idWBPrint' width=0 height=0 classid='clsid:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
idWBPrint.ExecWB(6, -1);
idWBPrint.outerHTML = ""; }
</script>
===============================
===============================
==================================================
======
Here is my html code.
----------------------------------
================================
<html>
<head>
<script language=JScript>
function doprint() {
document.body.insertAdjacentHTML("beforeEnd", "<object id='idWBPrint' width=0 height=0 classid='clsid:8856F961-340A-11D0-A96B-00C04FD705A2'></object>");
idWBPrint.ExecWB(6, -1);
idWBPrint.outerHTML = ""; }
</script>
</head>
<p style="margin-top: 0; margin-bottom: 0" align="center">Print test</p>
<INPUT type="button" value="Print Page" onclick="doprint()" ;></FORM>
</body>
</html>
==================================================
========
Thanks for your time...