Real Software Forums
http://forums.realsoftware.com/

ActiveX WebBrowser control Accessing the DOM
http://forums.realsoftware.com/viewtopic.php?f=6&t=41216
Page 1 of 1

Author:  digitalgecko [ Fri Oct 28, 2011 3:19 pm ]
Post subject:  ActiveX WebBrowser control Accessing the DOM

After much searching and failing I humbly ask....

How can I access the DOM when using the WebBrowser ActiveX component (Not HTMLViewer)

I have tried

WebBrowser1.Document.Body.innerHTML = "hello world"

as you would in VB and this fails at compile time.

I have also tried some variations of this
Dim obj as OLEObject

obj = WebBrowser1.Document
obj = OLEObject( obj.Invoke("body") )
obj.Property("innerHTML") = "<font color=blue>Yay!</font>"


And it does not seem to work in 2011r3. I am looking to be able to edit the dom and execute javascript all things that should be possible, I swear I have done it before in RS.

Author:  digitalgecko [ Fri Oct 28, 2011 3:51 pm ]
Post subject:  Re: ActiveX WebBrowser control Accessing the DOM

Hmm, it seems if I copy the activeX control from the example it works as i would expect. Just adding it doesnt

Author:  pawn [ Sat Oct 29, 2011 10:39 pm ]
Post subject:  Re: ActiveX WebBrowser control Accessing the DOM

:|

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/