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
Go to Page: Previous12
Current Page: 2 of 2
Re: Calling the onchange of an IHTMLSelectElement
Posted by: Zer (
Date: Saturday, 08-Oct-2005, 23:15:59

I can't find this menu in the HtmlEditor. Can someone pls post the URL to the right download?

Re: Calling the onchange of an IHTMLSelectElement
Posted by: glyn (
Date: Friday, 16-Dec-2005, 16:01:55


I am also sorry for polluting the forum with offtopic stuff, but I have a now only have one problem with axwebbrowser control in that is, how to implement javascript drag and drop functionality.

I can get javascript to function, no problem, but try coding in a javascript drag and drop functionality and woops this does not work...!

Has anyone figured this out?

When I find the solution I will post it here for anyone else to share and avoid a headache :-)



Re: Calling the onchange of an IHTMLSelectElement
Posted by: Harjeet Chandwani (
Date: Monday, 26-Dec-2005, 18:31:09

I am new to using mshtml. If i ask any useless question sorry for that.

The code of Tim below dated 08-29-04 19:02 ,

mshtml.IHTMLWindow2 win = this.htmlEditor1.Document.parentWindow;

worked for me, thanks tim.
My javascripf funciton is runscript(this), it worked fine with above approach, but if in one situation , the value of my javascript function is runscript(this.selectedIndex). On using this i am getting exception.

If anyone can give me solution in the similar lines of Tim, it would be great help.

Thanks in advance,

Re: Calling the onchange of an IHTMLSelectElement
Posted by: qiwoei (219.142.125.---)
Date: Monday, 16-Jul-2007, 14:29:10

HI Willem Kokke:

if i dont use AxWebBrowser,but directly get the IHTMLDocument from a URL,
then the fireEvent method wont work,why?

Re: Calling the onchange of an IHTMLSelectElement
Posted by: vikram kalsan (
Date: Sunday, 03-Aug-2008, 02:23:09

Hi william
it is indeed a wonderful help for me also.
i am also working on same mshtml events.
your code works fine if to execute onchange function.
my problem is a bit different.

actually i need to trap all the events of HTML controls using javascript.
like iam able to trap onclick,etc.
but onchnage i am not able to trap.

means, if user changes the value in the select box, my function in C# should be called and i can know what selection use has made.

is it possible..
i hope .. you can really solve my query else i will be in soup.


Thanks William!
Posted by: Regin (
Date: Tuesday, 10-Feb-2009, 15:09:07

Thanks So much William! I had no idea about this class and this kind of work. But looking at your code I was able to make my app work (after searching a lot in Google) and also to learn these things! Thanks so much!

Willem Kokke Wrote:
> Sorry for polluting the forum with offtopic stuff,
> but I figure other people might want to know the
> solution as well, and this forum comes up quite
> alot in google :-)
> Anyway, to invoke the eventhandler of an element
> on a webpage hosted in AxWebbrowser do this:
> private void
> executeOnChangeHandler(IHTMLSelectElement element)
> {
>   if(element.onchange != DBNull.Value)
>   {
>     IHTMLElement e = element as
> IHTMLElement;
>     IHTMLDocument4 doc = e.document as
> IHTMLDocument4;
>     object dummy = null;
>     object
> eventObj=doc.CreateEventObject(ref dummy);
>     HTMLSelectElementClass se = element
> as HTMLSelectElementClass;
>     se.FireEvent("onchange",ref
> eventObj);
>   }
> }
> and to format your code you can insert  
> for each tab you want

how to include the java script function in the PHP?
Posted by: hema (203.129.242.---)
Date: Friday, 03-Apr-2009, 06:23:17

we've a problem including java script function in our PHP code,
we've a fuction called print_many_words(object name)which is wrritten in javascript, now we want to use this function in the shown echo statement

echo "<td><input type=\"hidden\" name=\"Word\" value=$String ><b>$String</b></td>";
here we want to include print_many_words(object name) with onFocusOut...

how to do this?? please reply soon
Thank you....

Re: Calling the onchange of an IHTMLSelectElement
Posted by: Corey (
Date: Wednesday, 17-Jun-2009, 23:08:34

I need to know the return value returned by the javascript method called by the event that I'm calling using FireEvent (using the code above).

The IHTMLEventObj is supposed to have this value set in the returnValue property but it is always null (instead of true or false).

Any ideas how to get this working? I'm calling the onclick event of a hyperlink and if the return value is false then the hyperlink should not be clicked, otherwise if it is true then it should (by calling IHTMLAnchorElement's click method).

Any help would be appreciated. Thanks!


Re: Calling the onchange of an IHTMLSelectElement
Posted by: Ralph (
Date: Thursday, 17-Dec-2009, 03:27:06

That was extremely helpful, so thanks so much! I adapted it to a simpler case and it worked a treat.

As to Mayank's "DocumentComplete" - I wish I could get it to fire at all. It's causing me lots of grief. Anyway, meanwhile one major problem has been solved.

Re: Calling the onchange of an IHTMLSelectElement
Posted by: E (65.248.129.---)
Date: Thursday, 28-Jan-2010, 19:18:44

Mayank, I'm not sure if this will fill your needs but you might take a look at



Go to Page: Previous12
Current Page: 2 of 2

Your Name: 
Your Email: 
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.
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.