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

Discussion in 'ASP General' started by andrewg, Aug 3, 2007.

  1. andrewg

    andrewg Guest

    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?
     
    andrewg, Aug 3, 2007
    #1
    1. Advertising

  2. andrewg

    Evertjan. Guest

    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.


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 4, 2007
    #2
    1. Advertising

  3. "Evertjan." <> wrote in message
    news:Xns99826916644BCeejj99@194.109.133.242...
    > 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.
    >


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

    --
    Anthony Jones - MVP ASP/ASP.NET
     
    Anthony Jones, Aug 4, 2007
    #3
  4. andrewg

    Evertjan. Guest

    Anthony Jones wrote on 04 aug 2007 in
    microsoft.public.inetserver.asp.general:

    > "Evertjan." <> wrote in message
    > news:Xns99826916644BCeejj99@194.109.133.242...
    >> 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.
    >>

    >
    > 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.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Aug 4, 2007
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    894
    John C. Bollinger
    Jan 27, 2006
  2. rogerp
    Replies:
    0
    Views:
    559
    rogerp
    Mar 22, 2009
  3. rogerp
    Replies:
    0
    Views:
    593
    rogerp
    Mar 22, 2009
  4. Nicolas
    Replies:
    0
    Views:
    735
    Nicolas
    Apr 24, 2009
  5. Nomen Nescio
    Replies:
    50
    Views:
    1,963
    James Kanze
    Jan 31, 2011
Loading...

Share This Page