(Using Visual Studio 2005 and C#)

I'm trying to set up an event handler for trapping activity involving
an input text element of a web page. I've tried using onclick, onenter,
onactivate (see code snippet below), etc handlers but while they seem
to be set successfully during my web page parsing, the specified
methods never seem to get triggered:

HTMLInputTextElementEvents2_Event inputTextElemEvt;
IHTMLInputTextElement foo = (IHTMLInputTextElement)currElem;
inputTextElemEvt = (HTMLInputTextElementEvents2_Event)foo;
inputTextElemEvt.onactivate += new
HTMLInputTextElementEvents2_onactivateEventHandler(inputTextElemEvt_onactivate);

My event handling for HTML links, drop-down menus, etc which is
implemented in a similar manner seems to work just fine.


p.s. apologies in advance if this is not posted in the right section of
the forums - if that's the case, please advise where should I migrate
this post to.

thanks
Greg

Re: Event handling for input element by russiandevil

russiandevil
Tue Jan 23 17:40:50 CST 2007

hi Ciaran, I'm using AxWebBrowser control in the form as an embedded
browser, to navigate to a web page and then parse its contents etc...
in the DocumentComplete event handling function I set up the event
handlers for the HTML elements within the web page, including input
text elements (fields)

regards,
Greg


Ciaran O''''Donnell wrote:
> Why not use an ASP.NET text box. Then you can use OnTextChanged for a
> postback event.
>
>
> --
> Ciaran O'Donnell
> http://wannabedeveloper.spaces.live.com
>
>
> "russiandevil@gmail.com" wrote:
>
> >
> > (Using Visual Studio 2005 and C#)
> >
> > I'm trying to set up an event handler for trapping activity involving
> > an input text element of a web page. I've tried using onclick, onenter,
> > onactivate (see code snippet below), etc handlers but while they seem
> > to be set successfully during my web page parsing, the specified
> > methods never seem to get triggered:
> >
> > HTMLInputTextElementEvents2_Event inputTextElemEvt;
> > IHTMLInputTextElement foo = (IHTMLInputTextElement)currElem;
> > inputTextElemEvt = (HTMLInputTextElementEvents2_Event)foo;
> > inputTextElemEvt.onactivate += new
> > HTMLInputTextElementEvents2_onactivateEventHandler(inputTextElemEvt_onactivate);
> >
> > My event handling for HTML links, drop-down menus, etc which is
> > implemented in a similar manner seems to work just fine.
> >
> >
> > p.s. apologies in advance if this is not posted in the right section of
> > the forums - if that's the case, please advise where should I migrate
> > this post to.
> >
> > thanks
> > Greg
> >
> >


RE: Event handling for input element by CiaranODonnell

CiaranODonnell
Thu Jan 18 03:12:00 CST 2007

Why not use an ASP.NET text box. Then you can use OnTextChanged for a
postback event.


--
Ciaran O'Donnell
http://wannabedeveloper.spaces.live.com


"russiandevil@gmail.com" wrote:

>
> (Using Visual Studio 2005 and C#)
>
> I'm trying to set up an event handler for trapping activity involving
> an input text element of a web page. I've tried using onclick, onenter,
> onactivate (see code snippet below), etc handlers but while they seem
> to be set successfully during my web page parsing, the specified
> methods never seem to get triggered:
>
> HTMLInputTextElementEvents2_Event inputTextElemEvt;
> IHTMLInputTextElement foo = (IHTMLInputTextElement)currElem;
> inputTextElemEvt = (HTMLInputTextElementEvents2_Event)foo;
> inputTextElemEvt.onactivate += new
> HTMLInputTextElementEvents2_onactivateEventHandler(inputTextElemEvt_onactivate);
>
> My event handling for HTML links, drop-down menus, etc which is
> implemented in a similar manner seems to work just fine.
>
>
> p.s. apologies in advance if this is not posted in the right section of
> the forums - if that's the case, please advise where should I migrate
> this post to.
>
> thanks
> Greg
>
>