Mshtml and Javascript

With the getElementsByTagName method to get script tags.
 
VB.NET:
Expand Collapse Copy
Dim HTMLDoc As mshtml.HTMLDocument
HTMLDoc = AxWebBrowser1.Document
Dim htmlCollection As IHTMLElementCollection
htmlCollection = HTMLDoc.getElementsByTagName("script")
 
MsgBox(htmlCollection.toString)
- returns [object]

Is there also anyway to stop axwebbrowser displaying the script errors alert?
 
Last edited by a moderator:
Surely you want to process each element (each script tag) in the collection? They are of type mshtml.IHTMLElement, look up this in Object Browser to see what members it has.

I think the Silent property of the browser will surpress the script error messages.
 
Back
Top