is there an HTMLInputElement event handler? (webbrowser dev)

A

Ana Lindt

Hello,

I have a little webbrowser control in my c# winforms app, and would like
to catch those nifty DOM events and do some fancy stuff with them.

Let's say i have some button in the web page:
<button id='buttonID'>click here</button>

then with the following two lines of C# i can catch the click event:


-- code ---------------------------------
HTMLButtonElement button = (HTMButtonElement)
someWebBrowser.dom.all.item("buttonID", null);

((HTMLButtonElementEvents2_Event) button).onclick += new
HTMLButtonElementEvents2_onclickEventHandler(someWebBrowser.button_click
);

private void button_click(...) {...}
-- eoc ----------------------------------


Now id like to do exactly the same thing with a checkbox:
<input type='checkbox'>this is a check box

-> The problem is: Even though the HTMLInputElement is in the mshtml
namespace, I can't find a "HTMLInputElementEvents2_Event" handler!
How can I use the HTMLInputElement.onclick event??

Thanks in advance for any help,

Ana L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top