agrothe 26 Junior Poster

I've added a vbscript to an asp page in order to print without showing the print dialog box.

Everything works fine when you first load the page, but when you try and navigate away from the page, you get the "A script on this page has caused internet explorer to run slowly" error.

this code was added in the <head> tags,

<%
  Sub cmdClickMe_OnClick
          WBControl.ExecWB 6,2,3
          set WBControl = nothing
  End Sub
%>

and this on the page body,

<object id="WBControl" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
<img src="images/print.gif" NAME="cmdClickMe" VALUE="Click> Me"
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.