HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Unable to call IHTMLWindow2.execScript()
Posted by: Sacha Faust (199.72.29.---)
Date: Monday, 28-Jul-2003, 20:45:33

I've been trying to load html in IE from a string buffer latelly and it works fine but something happens when you try to get an instance of the IHTMLWindow2 via the HTMLDocument.Scripts property.

Using HtmlEditor I get the same problem, if you try to call in the IHTMLWindow2 , you get an exception related to an invalid handle.

I only get that when I load HTMLDocument object from a buffer but if I use
IE object Navigate call to a local resource , it works fine.

Any idea what happens?

Re: Unable to call IHTMLWindow2.execScript()
Posted by: Tim (---.server.ntli.net)
Date: Sunday, 03-Aug-2003, 15:19:31

I've not tried this. Can you post some code that fails?

Tim

Re: Unable to call IHTMLWindow2.execScript()
Posted by: kokman (116.25.51.---)
Date: Monday, 08-Sep-2008, 10:49:10

following code is in DempHtmlApp project:

IHTMLWindow2 win = this.htmlEditor1.HtmlDocument2.GetParentWindow();
win.execScript("runscript();", "javascript");
It always hints an error: Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)

pls help!
-------------------------------------------------------
Sacha Faust Wrote:
-------------------------------------------------------
> I've been trying to load html in IE from a string
> buffer latelly and it works fine but something
> happens when you try to get an instance of the
> IHTMLWindow2 via the HTMLDocument.Scripts
> property.
>
> Using HtmlEditor I get the same problem, if you
> try to call in the IHTMLWindow2 , you get an
> exception related to an invalid handle.
>
> I only get that when I load HTMLDocument object
> from a buffer but if I use
> IE object Navigate call to a local resource , it
> works fine.
>
> Any idea what happens?



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
Mu4PU
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.