
Sep 6th, 2007, 16:09
|
|
New Member
|
|
Join Date: Aug 2007
Location: UK
Age: 24
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
Print Without Prompt
Is it possible to use the print without prompt script using IE7? I run an intranet and would like an invoice to print off after an order has been placed. It works, but obviously prompts the user each time, so i was hoping for a work around just to print the info without a prompt? Ive found a couple of scripts that apparently work, but i keep getting errors. Ive put the code i found below. Any help would be appreciated.
- Code: Select all
<html>
<head>
<title>Print Test</title>
<script>
function Print()
{
if (document.all)
{
WebBrowser1.ExecWB(6, 6) //use 6, 1 to prompt the print dialog or 6, 6 to omit it;
WebBrowser1.outerHTML = "";
}
else
{
window.print();
}
}
</script>
</head>
<body>
<object ID="WebBrowser1" WIDTH="0" HEIGHT="0"
CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
</object>
<A HREF="#" onClick="Print()">Print this page</a>
</body>
</html>
Last edited by karinne; Sep 6th, 2007 at 16:22.
Reason: Please use [ code ]...[ /code ] tags when displaying code.
|