473,395 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 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 2715

"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 closest groups I could find with my limited...
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 table includes an image field which contains most of...
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. functions.inc...
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 and the PHP script run as CLI. However, "info.php"...
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 ok" End Function </script>
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 error I just cannot find a solution to: On...
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, yet it leaves no errors in the error logs. This is...
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 couple of years, despite having very crude...
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 download a file. You click a form button or click...
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. So I have installed myphpProxy on my server under...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.