467,077 Members | 1,145 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,077 developers. It's quick & easy.

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
Nov 15 '05 #1
  • viewed: 2471
Share:
5 Replies

"Tam Inglis" <jo***********@btclick.com> wrote in message
news:bq**********@titan.btinternet.com...
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


Can i be rude and pop another question...

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

myWebDoc.execCommand("SaveAs",false,"C:\temp.jpg") ;
myWebDoc.execCommand("SaveAs",true,"C:\temp.jpg");
Nov 15 '05 #2
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
http://www.networkip.net/dotnet/tidbits/default.htm
"Tam Inglis" <jo***********@btclick.com> wrote in message
news:bq**********@titan.btinternet.com...
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

Nov 15 '05 #3
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. InternetExplorer doesnt and i was under the impression that it
used the same settings.
"Alvin Bruney" <vapor at steaming post office> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
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
http://www.networkip.net/dotnet/tidbits/default.htm
"Tam Inglis" <jo***********@btclick.com> wrote in message
news:bq**********@titan.btinternet.com...
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


Nov 15 '05 #4
"Tam Inglis" <jo***********@btclick.com> wrote:
Both of these statements cause the [error] dialog box
to show. any thoughts as to why?

myWebDoc.execCommand("SaveAs",false,"C:\temp.jpg") ;
myWebDoc.execCommand("SaveAs",true,"C:\temp.jpg");


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

Try "C:\\temp.jpg" or @"C:\temp.jpg" instead.

P.

--
www.CL4.org
Nov 15 '05 #5
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" <fi******************@CL4.org> wrote in message
news:bq**********@sparta.btinternet.com...
"Tam Inglis" <jo***********@btclick.com> wrote:
Both of these statements cause the [error] dialog box
to show. any thoughts as to why?

myWebDoc.execCommand("SaveAs",false,"C:\temp.jpg") ;
myWebDoc.execCommand("SaveAs",true,"C:\temp.jpg");


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

Try "C:\\temp.jpg" or @"C:\temp.jpg" instead.

P.

--
www.CL4.org

Nov 15 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by tshad | last post: by
15 posts views Thread by Lawrence Krubner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.