script error

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tam Inglis

    #1

    script error

    I have a web browser contol working sweetly.

    However when it hits a page with java script that has an error it throws up
    a dialog box each time prompting me "Do you wish to continue running scripts
    on this page"

    How can i supress this message... its gotta be something simple and ive been
    hunting for the answer for ages... any help appreciated.

    Tam


  • Tam Inglis

    #2
    Re: script error


    "Tam Inglis" <joseph.inglis@ btclick.com> wrote in message
    news:bqtigv$sqc $1@titan.btinte rnet.com...[color=blue]
    > I have a web browser contol working sweetly.
    >
    > However when it hits a page with java script that has an error it throws[/color]
    up[color=blue]
    > a dialog box each time prompting me "Do you wish to continue running[/color]
    scripts[color=blue]
    > on this page"
    >
    > How can i supress this message... its gotta be something simple and ive[/color]
    been[color=blue]
    > hunting for the answer for ages... any help appreciated.
    >
    > Tam
    >[/color]

    Can i be rude and pop another question...

    Both of these statements cause the dialog box to show. any thoughts as to
    why?

    myWebDoc.execCo mmand("SaveAs", false,"C:\temp. jpg");
    myWebDoc.execCo mmand("SaveAs", true,"C:\temp.j pg");


    Comment

    • Alvin Bruney

      #3
      Re: script error

      about the only thing you can do is map the windows.onerror event to a
      routine which basically will return a null to suppress the event bubble up
      the call stack. I'm not a big fan of that approach either because what you
      are doing is essentially surpressing the error detection and reporting
      mechanism. For example, it would suppress the script error but it will also
      suppress a critical null object error which you might want to catch and fix.
      Anyway the script syntax would be put in something like your window_onload
      routine where you say window.onerror = myfunction

      --
      Regards,
      Alvin Bruney
      NetworkIP helps MNOs and MVNOs launch bundled and add-on international calling with direct US carrier connections, low risk and 25+ years of telecom expertise.

      "Tam Inglis" <joseph.inglis@ btclick.com> wrote in message
      news:bqtigv$sqc $1@titan.btinte rnet.com...[color=blue]
      > I have a web browser contol working sweetly.
      >
      > However when it hits a page with java script that has an error it throws[/color]
      up[color=blue]
      > a dialog box each time prompting me "Do you wish to continue running[/color]
      scripts[color=blue]
      > on this page"
      >
      > How can i supress this message... its gotta be something simple and ive[/color]
      been[color=blue]
      > hunting for the answer for ages... any help appreciated.
      >
      > Tam
      >
      >[/color]


      Comment

      • Tam Inglis

        #4
        Re: script error

        Ah. I dont create the script :-( The application will be surfing to unkown
        sites and kinda must be able to handle this.

        Basically it can come from anywhere... just need to prevent that dialog box
        popping up. InternetExplore r doesnt and i was under the impression that it
        used the same settings.


        "Alvin Bruney" <vapor at steaming post office> wrote in message
        news:OKYkoRFvDH A.2072@TK2MSFTN GP10.phx.gbl...[color=blue]
        > about the only thing you can do is map the windows.onerror event to a
        > routine which basically will return a null to suppress the event bubble up
        > the call stack. I'm not a big fan of that approach either because what you
        > are doing is essentially surpressing the error detection and reporting
        > mechanism. For example, it would suppress the script error but it will[/color]
        also[color=blue]
        > suppress a critical null object error which you might want to catch and[/color]
        fix.[color=blue]
        > Anyway the script syntax would be put in something like your window_onload
        > routine where you say window.onerror = myfunction
        >
        > --
        > Regards,
        > Alvin Bruney
        > http://www.networkip.net/dotnet/tidbits/default.htm
        > "Tam Inglis" <joseph.inglis@ btclick.com> wrote in message
        > news:bqtigv$sqc $1@titan.btinte rnet.com...[color=green]
        > > I have a web browser contol working sweetly.
        > >
        > > However when it hits a page with java script that has an error it throws[/color]
        > up[color=green]
        > > a dialog box each time prompting me "Do you wish to continue running[/color]
        > scripts[color=green]
        > > on this page"
        > >
        > > How can i supress this message... its gotta be something simple and ive[/color]
        > been[color=green]
        > > hunting for the answer for ages... any help appreciated.
        > >
        > > Tam
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Paul E Collins

          #5
          Re: script error

          "Tam Inglis" <joseph.inglis@ btclick.com> wrote:
          [color=blue]
          > Both of these statements cause the [error] dialog box
          > to show. any thoughts as to why?
          >
          > myWebDoc.execCo mmand("SaveAs", false,"C:\temp. jpg");
          > myWebDoc.execCo mmand("SaveAs", true,"C:\temp.j pg");[/color]

          '\t' is probably being interpreted as a tab character.

          Try "C:\\temp.j pg" or @"C:\temp.jp g" instead.

          P.

          --



          Comment

          • Tam Inglis

            #6
            Re: script error

            thanks to both who replied.

            sorry, should have been clearer. that was a paste from the debugger, the c#
            statement is indeed already escaped as you suggested.

            However. I found an old visual basic reference that basically said that the
            path argument is ignored when used in this manner with ExecWB. Security
            policy denies it as it would mean any webpage could upload thousands of
            files to your machine. So no matter what you specify it simply ignores it.

            Would seem to be the case, as no matter the path specified, it always
            defaults to MyPictures.

            There must be a way of extracting the image though. Either from the webpage
            itself where i beleive it is a metafile or from the cache. Bit of a pain
            though as this is unexplored territory for me.

            Maybe thats a good thing though ;-) Nothing like being forced to learn.
            hehe.

            "Paul E Collins" <find_my_real_a ddress@CL4.org> wrote in message
            news:bquuq2$4jk $1@sparta.btint ernet.com...[color=blue]
            > "Tam Inglis" <joseph.inglis@ btclick.com> wrote:
            >[color=green]
            > > Both of these statements cause the [error] dialog box
            > > to show. any thoughts as to why?
            > >
            > > myWebDoc.execCo mmand("SaveAs", false,"C:\temp. jpg");
            > > myWebDoc.execCo mmand("SaveAs", true,"C:\temp.j pg");[/color]
            >
            > '\t' is probably being interpreted as a tab character.
            >
            > Try "C:\\temp.j pg" or @"C:\temp.jp g" instead.
            >
            > P.
            >
            > --
            > www.CL4.org
            >
            >[/color]


            Comment

            Working...