Dear all,
I am writing a Javascript which print a page without prompting the
print dialog when the page is loaded. However, there is a warning box
prompted out because I am requesting the privilege of client's
computer. But my boss doesn't want to lower the security settings and
doesn't want to see the prompt dialog. I am wonder that signing the
javascript can solve the problem or not.
I am using the code to bypass the print dialog:
<script>
function Print()
{
if (document.all)
{
if (confirm("Print now?"))
{
WebBrowser1.ExecWB(6, 6) //use 6, 1 to prompt the print
dialog or 6, 6 to omit it;
WebBrowser1.outerHTML = "";
//alert("print now");
}
}
else
{
window.print();
}
}
</script>
Since the ExecWB(6,6) activeX control is not written by me so I cannot
sign it. But can I get the same result if I can sign the javascript?
Thank you everyone !!
FatBo