Link to home
Start Free TrialLog in
Avatar of scottmichael2
scottmichael2

asked on

Capture individual control events in DOM or where they occur

I am doing a VB 6.0 project and grabbing the DOM from an existing IE Window (no WebBrowser control, just mshtml library).  I am successfully capturing events, but I can't figure out how to get a reference to the actual control and modify it if necessary.  In other words...

Say there is a single IE instance open with a single document (I won't even worry about frames at this point).  That document has a single input control of type text.  The user types a letter in the control.  I can capture the event (KeyDown, KeyUp, and KeyPress), but how do I figure out what control it is and modify the contents of it?

Thanks very much!!
Scott
Avatar of AzraSound
AzraSound
Flag of United States of America image

window.event should return the object firing the event.  So, window.event.value = "Event Happened" should work, for example.
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of scottmichael2
scottmichael2

ASKER

That did it - thanks very much!!
Glad I could help   :-)