HI to all

I have got one problem:

I use vb 2008

On some websites i go whit my Web browser i got an error!!!

it say:

An error has occurred in script on this page.

Line: 133
Char: 74
Error: Unterminated string constant
Code: 0
Url: www.url.com

Do you want to continue running scripts on this page?

Yes No (two buttons)

Do you know how can i remove that error from my application???

Attachments Image1.jpg 17.09 KB
7 Years
Discussion Span
Last Post by Vb2008

This is a script error not a coding problem (ie it's on the webpage).

You can stop it simply by setting:

Webbrowser1.ScriptErrorsSuppressed = True

This will also stop some authentication boxes etc though so you are better of using:

AddHandler Webbrowser1.DocumentCompleted, AddressOf webbrowser1_DocumentCompleted

    Private Sub webbrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs)

        AddHandler CType(sender, WebBrowser).Document.Window.Error, AddressOf Window_Error

    End Sub

    Private Sub Window_Error(ByVal sender As Object, _
        ByVal e As HtmlElementErrorEventArgs)

        ' Ignore the error and suppress the error dialog box. 
        e.Handled = True

    End Sub
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.