How to set entire HTML in MSHTML?
I am trying using this assignment:
(Document as IHTMLDocument3).documentElement.innerHTML := 'abc';
but I got the error:
"Target element invalid for this operation"
I've also tried using
(Document as IHTMLDocument2).write
but this form only adds HTML into the body section, and I need to replace all the HTML source.
Does somebody have any idea of how I do this?
Thanks in advance.
Here's some of my old code, see if it helps you:
As an alternative you can also use TEmbededWB which is an extended wrapper around a web browser and has some easy to use methods that provide this functionality.