Webbrowser control: override onload?
I have a webpage loading into a webbrowser control but the webpage (which I cannot edit) calls a javascript function in the body onload.
I what to stop the onload from firing.
This doesn't work:
Code:
Private Sub WebBrowser2_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Dim doc As HTMLDocument
Set doc = WebBrowser2.Document
doc.body.removeAttribute "onload"
End Sub
Any ideas?
Thanks
Re: Webbrowser control: override onload?
too late in document complete
there is an event that fires as soon as navigation starts, you may need to try some code there
Re: Webbrowser control: override onload?
Hmm... I don't think it's actually possible
Thanks