I have a VB.NET class that is called with the context menu extension in Internet Explorer.
The code has access to the page object model, and reading data is not a problem. This is the code of the test function ... it changes the text of the status bar (OK), prints the HTML page (OK), changes the HTML by adding text and prints the HTML page of the page again (OK, in the second poppy the added text is in HTML)
But the Internet Explorer window does not display it. Where am I doing wrong?
Public Sub CallingTest(ByRef Source As Object)
Dim D As mshtml.HTMLDocument = Source.document
Source.status = "Working..."
Dim H As String = D.documentElement.innerHTML()
MsgBox(H)
D.documentElement.insertAdjacentText("beforeEnd", "ThisIsATest")
H = D.documentElement.outerHTML()
MsgBox(H)
Source.status = ""
End Sub
The function is called like this from JavaScript:
<script>
var EB = new ActiveXObject("MyObject.MyClass");
EB.CallingTest(external.menuArguments);
</script>
source
share