Object tag causing asp script to timeout and my hair to fallout

A

andrewg

I've added a vbscript to an asp page in order to print without showing
the print dialog box. This is run on a local computer with only one
printer installed not on the internet, so the usual security issues do
not apply.

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,

1. <script language="VBScript">
2. Sub cmdClickMe_OnClick
3. WBControl.ExecWB 6,2,3
4. set WBControl = nothing
5. End Sub
6. </script>

and this on the page body,

1. <object id="WBControl" width="0" height="0" classid="CLSID:
8856F961-340A-11D0-A96B-00C04FD705A2"></object>
2. <img src="images/print.gif" NAME="cmdClickMe" VALUE="Click
Me">

Taking the <object> tag off keeps the page working fast, replacing
either at the top, middle or bottom causes the page to time out when
navigating away from the page, regardless of having used the vbscript.
Any clues whatsoever?
 
E

Evertjan.

andrewg wrote on 03 aug 2007 in microsoft.public.inetserver.asp.general:
I've added a vbscript to an asp page

There is no such thing as an ASP page.

There are ASP files instructing the server to send a HTML string to a
client. These html streams can(!) have an .asp extension.
... in order to print without showing
the print dialog box. This is run on a local computer with only one
printer installed not on the internet, so the usual security issues do
not apply.

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,

1. <script language="VBScript">
2. Sub cmdClickMe_OnClick
3. WBControl.ExecWB 6,2,3
4. set WBControl = nothing
5. End Sub
6. </script>

and this on the page body,

1. <object id="WBControl" width="0" height="0" classid="CLSID:
8856F961-340A-11D0-A96B-00C04FD705A2"></object>
2. <img src="images/print.gif" NAME="cmdClickMe" VALUE="Click
Me">

Taking the <object> tag off keeps the page working fast, replacing
either at the top, middle or bottom causes the page to time out when
navigating away from the page, regardless of having used the vbscript.
Any clues whatsoever?

This is clientside scriptng,
so has NOTHING to do with ASP,
ASP being SERVERSIDED.

ASP doesn't even know there is such a thing as a browser.

PLease look for another NG.
 
A

Anthony Jones

Evertjan. said:
andrewg wrote on 03 aug 2007 in microsoft.public.inetserver.asp.general:


There is no such thing as an ASP page.

Yeah cos that would mean it would be a Active Script Page Page which is daft
right?
 
E

Evertjan.

Anthony Jones wrote on 04 aug 2007 in
microsoft.public.inetserver.asp.general:
Yeah cos that would mean it would be a Active Script Page Page which
is daft right?

Yes, Anthony.

These HTML pages are generated by the ASP engine reading an ASP file.

So they are as-pages and not asp-pages.

That seems overdone,
but my explanation makes sense in the context of the OQ.

Viewsourcing the clientside stream "source" and saving that as a .html,
or even .asp extended file gives, when viewed by a browser, the same, but
now static, browser view.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top