Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Webbrowser problems

Posted on 2006-04-12
Medium Priority
Last Modified: 2011-10-03
Well I have 2 problems:

1) Those annoying javascript runtime errors.
I want to ignore them so I have the following code
Private Sub webRegister_DownloadComplete()
    On Error Resume Next
    Set objDoc = webRegister.Document
    Set objWind = objDoc.parentWindow
End Sub
Private Sub webRegister_NavigateComplete2(ByVal pDisp As Object, URL As Variant)
    On Error Resume Next
    Set objDoc = webRegister.Document
    Set objWind = objDoc.parentWindow
End Sub
Public Sub objWind_onerror(ByVal description As String, ByVal URL As String, ByVal line As Long)
    On Error Resume Next
    Set objEvent = objWind.event
    With objEvent
        .returnValue = True
    End With
End Sub

Why I put the On Error Resume Next?  Well if I debug it, I dont have any problems and everything runs fine.  When I compile it and run the *.exe I sometimes get erros.  Why? I have no idea.
Now this code only works when the user has changed the "check for script errors" in IE tools.  But I dont want that.  It has to work without any problems for the user cause it sucks when you have to tell the user what he/she has to do.
The java error I get only happens with a visual basic webbrowser, not when I use firefox or IE and check that site out.

So either I need to ignore those runtime errors or I would like to have a script that enables that specific IE option.

2) http://users.pandora.be/stofferken/stupiderror.JPG <-Since today I am getting this error
I dont remember having changed that much but I didnt get this error before.
I have no clue what it means but it has to do something with my webbrowser I think.
Anyone can explain this error and tell me how to get rid of it?

Please help

Question by:black_help
  • 3
LVL 28

Expert Comment

ID: 16437934
1) Have you tried setting the WB Silent property to True?

2) No idea, w/o further info on where/when/how that error is occurring.

Author Comment

ID: 16439791
1) That option is basically the same as the one I am currently using, but it will force the runtime control to start by just bypassing the error message like if you had pressed "yes"
So thats not at all what I need.

2) I have no further info, thats my problem I only get this error after my program is compiled so I never get this when I debug.
I tried finding the place were this bug occurs by adding messages boxes after every line but it seems to occur @ something like form1.label1.visible = true after the webbrowser had the DownloadComplete event.

Author Comment

ID: 16451142
Ok, I recoded my the webbrowser part and I no longer get that second error.
I still dont know what it was but no need to bother anymore.

However my first question still stands.
How to change the IE options?
Is it possible to kill the (runtime check) process without the user having any knowledge about it when a javascript error would occur?
Id very much like to have an answer soon since Ive been looking for this for quite some time now.

Any solution in wich the webbrowser just continues working and the user having no knowledge about possible errors will do.

Author Comment

ID: 16451721
Solved it myself:
"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\Disable Script Debugger" -> "yes"

does the trick


Accepted Solution

GranMod earned 0 total points
ID: 16475797
Closed, 500 points refunded.
The Experts Exchange
Community Support Moderator of all Ages

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month12 days, 6 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question