472,353 Members | 1,505 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,353 software developers and data experts.

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
5 2640

"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the...
6
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This...
12
by: tshad | last post by:
I am not sure why I am getting this error: I have the following code I want to run from another include file that holds all my functions. ...
17
by: comp.lang.tcl | last post by:
The TCL command I am using will do a command-line action on a PHP script: set cannotRunPHP I have to do it this way as both the TCL script...
19
by: thisis | last post by:
Hi All, i have this.asp page: <script type="text/vbscript"> Function myFunc(val1ok, val2ok) ' do something ok myFunc = " return something...
5
by: Bjorn Sagbakken | last post by:
Hello I have just migrated from VS 2003 to VS 2005, and .NET framework 1.1 to 2.0 I am at the end of debugging and fixing stuff. Now there is one...
15
by: Lawrence Krubner | last post by:
Does anything about this script look expensive, in terms of resources or execution time? This script dies after processing about 20 or 25 numbers,...
3
by: GazK | last post by:
I have been using an xml parsing script to parse a number of rss feeds and return relevant results to a database. The script has worked well for a...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to...
7
by: jeddiki | last post by:
Hi, As I am in Turkey at present, I can not see vidoes on youtube. So I have tried a few proxies but keep finding them slow or not working. ...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
BLUEPANDA
by: BLUEPANDA | last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.