Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Web Browser - stopping script errors 2

Status
Not open for further replies.

stinkybee

Programmer
May 15, 2001
218
GB
I have developed my own browser using the VB web browser control, the problem is that script errors on web pages keep producing error messages. Is there a way to stop these.

 
Just seeing if anyone has any new ideas on this. I hope so because it is getting rather frustrating.
 
Typically, now I'm looking for a page to try out, I can't find one with a scripting error. Give us an example of a page to go to, and I'll have a play with my current code.

BB
 
I don't get an error at that page. I can see the problem with the missing " in the code, but neither IE or Opera produce the error.

I'll have a look this afternoon,

BB
 
IE won't if you have the settings to ignore script errors, try it with a vb browser control and the error appears.

My original problem was how to disable these errors in a browser control, basically is there is a way of reproducing the IE options "disable script debugging" and "display a notification about every script error".
 
There may be a distinction between using a web browser control and an instance of IE (I don't know), however I ofen use IE something like this:

Dim ie As Object
Set ie = CreateObject("internetexplorer.application")

The instance of IE takes note of the IE settings in the Registry so you need to set the following entries.

setRegEntry("Software\Microsoft\Internet Explorer\Main", "Disable Script Debugger", "yes")

setRegEntry("Software\Microsoft\Internet Explorer\Main", "Error Dlg Displayed On Every Error", "no")

If you don't have the code for setting registry entries I can post an example.

Depending upon what you are doing you might also want to set the IE security zone in a similar way.
 
I didn't know you could create an instance of ie like that, maybe that would be easier than using the browser control. If you could post the code example for registry settings and security zones that would be great.
One problem I may have with doing it this way is that my ie setting for "disable script debugging" is often being changed automatically. Until I find out why this is I may not be able to do it using an instance of ie.
Anyway, thanks for your help, I have been trying to overcome this problem for months and I might just finally be getting somewhere.
 
I didn't know you could create an instance of ie like that, maybe that would be easier than using the browser control. If you could post the code example for registry settings and security zones that would be great.
One problem I may have with doing it this way is that my ie setting for "disable script debugging" is often being changed automatically. Until I find out why this is I may not be able to do it using an instance of ie.
Anyway, thanks for your help, I have been trying to overcome this problem for months and I might just finally be getting somewhere.
 
Well, well. Looks like that has done the trick, thank you very much. Why I have never come across that in all my weeks of research I do not know.
 
strongm,

Thank you, I have been searching for about a week for a solution to the exact same problem. Thanks for a great and simple solution to this.

I will file this under "I wish I had known" !

*<-- for you!



Peace!! [americanflag] [peace] [americanflag]

Mike

Didn't get the answers that you wanted? Take a look at FAQ219-2884
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top