Handling HTML element events using AxWebBrowser

Ask a Question related to ASP Components, Design and Development.

  1. #1

    Default Handling HTML element events using AxWebBrowser

    Hello,

    I am trying to hook into the events for HTML textboxes. In particular the
    onchange event.

    In the document complete handler I attach a handler for the onclick and
    onchange events to each input element of type text.

    ((HTMLInputTextElementEvents_Event)element).onchan ge += new
    HTMLInputTextElementEvents_onchangeEventHandler(We bBrowserForm_onchange);
    ((HTMLInputTextElementEvents2_Event)element).oncli ck += new
    HTMLInputTextElementEvents2_onclickEventHandler(We bBrowserForm_onclick);

    The onclick fires but the onchange never does. In fact if I setup handlers
    for all of the events, only few of them seem to fire.

    I have searched the web for solutions and I see that many other people have
    had the same problem but no one seems to have a solution.

    Is there a solution for this? How does one handle these events.

    Thanks in advance,
    --
    Bill
    Bill Guest

  2. Similar Questions and Discussions

    1. Events Handling Order
      Hi all, I'm a total newbie, so this might be stupid... Anyway, I've created an expanding tree of categories control, based on DataList. It works...
    2. [HTML::Element] how to read element by element
      Hello I read the doc about HTML::Element, but I don't find how to read the tree create by parse() element by element. The doc says the tree looks...
    3. Handling events in container controls?
      Hi, I have a sub in a user control that looks like this: Public Sub BatchDetail_ItemCommand(ByVal Sender As Object, ByVal e As...
    4. Handling events in a datagrid
      Hi, I am having a datagrid with 3 radiobuttons in one template column and a textbox in another template column. How can I disable or enable the...
    5. Handling Events in Nested Controls
      Hi, I have nested User Controls like below. User_Control_1 User_Control_11 User_Control_12(contains method DisplayMessage) ...
  3. #2

    Default RE: Handling HTML element events using AxWebBrowser

    Sorry there is a small error in my previous post.

    I am using HTMLInputTextElementEvents2_Event for both onclick and onchange.

    Not HTMLInputTextElementEvents_Event for onchange and
    HTMLInputTextElementEvents2_Event for onclick as my code example in my
    previous post shows
    --
    Bill


    "Bill" wrote:
    > Hello,
    >
    > I am trying to hook into the events for HTML textboxes. In particular the
    > onchange event.
    >
    > In the document complete handler I attach a handler for the onclick and
    > onchange events to each input element of type text.
    >
    > ((HTMLInputTextElementEvents_Event)element).onchan ge += new
    > HTMLInputTextElementEvents_onchangeEventHandler(We bBrowserForm_onchange);
    > ((HTMLInputTextElementEvents2_Event)element).oncli ck += new
    > HTMLInputTextElementEvents2_onclickEventHandler(We bBrowserForm_onclick);
    >
    > The onclick fires but the onchange never does. In fact if I setup handlers
    > for all of the events, only few of them seem to fire.
    >
    > I have searched the web for solutions and I see that many other people have
    > had the same problem but no one seems to have a solution.
    >
    > Is there a solution for this? How does one handle these events.
    >
    > Thanks in advance,
    > --
    > Bill
    Bill Guest

  4. #3

    Default Re: Handling HTML element events using AxWebBrowser

    After much digging around, I found a solution to this. I have found a simple
    method of reliably handling any HTMLElement event you want to. If anybody is
    interested email me at [email]william.long@ripnet.com[/email] and I will send you a Visual
    Studio project that will build an assembly you can use for this purpose.

    Bill

    "Bill" <Bill@discussions.microsoft.com> wrote in message
    news:7136F55F-1CB2-4232-9A7E-8A3D9B9188B3@microsoft.com...
    > Sorry there is a small error in my previous post.
    >
    > I am using HTMLInputTextElementEvents2_Event for both onclick and
    > onchange.
    >
    > Not HTMLInputTextElementEvents_Event for onchange and
    > HTMLInputTextElementEvents2_Event for onclick as my code example in my
    > previous post shows
    > --
    > Bill
    >
    >
    > "Bill" wrote:
    >
    >> Hello,
    >>
    >> I am trying to hook into the events for HTML textboxes. In particular the
    >> onchange event.
    >>
    >> In the document complete handler I attach a handler for the onclick and
    >> onchange events to each input element of type text.
    >>
    >> ((HTMLInputTextElementEvents_Event)element).onchan ge += new
    >> HTMLInputTextElementEvents_onchangeEventHandler(We bBrowserForm_onchange);
    >> ((HTMLInputTextElementEvents2_Event)element).oncli ck += new
    >> HTMLInputTextElementEvents2_onclickEventHandler(We bBrowserForm_onclick);
    >>
    >> The onclick fires but the onchange never does. In fact if I setup
    >> handlers
    >> for all of the events, only few of them seem to fire.
    >>
    >> I have searched the web for solutions and I see that many other people
    >> have
    >> had the same problem but no one seems to have a solution.
    >>
    >> Is there a solution for this? How does one handle these events.
    >>
    >> Thanks in advance,
    >> --
    >> Bill

    Bill Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139