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???

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

Thank You

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.