954,549 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Web browser problem in vb2008?!?!

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.09KB
Vb2008
Newbie Poster
3 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

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
adamwilden
Newbie Poster
9 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 
Vb2008
Newbie Poster
3 posts since Dec 2009
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: