Hi,
The code snippet below works great but unlike Javascript I am
not receiving the "event object" in my Perl onclick event handler. What I need
is a Perl onclick handler to handler all clicks on the page. In Javascript I
would write something like:
window. {
window.event.srcElement.id; // This gives
me the ID attribute of the HTML element clicked : )
}
In Perl/Win32::OLE I'm wondering if I can get the same value
somehow, maybe like this?
Win32::OLE->WithEvents($ie,
'BrowserEvents', 'DWebBrowserEvents2');
package BrowserEvents;
sub DocumentComplete
{
$ie->Document->{onclick} = Win32::OLE->Forward(sub { print $ie->Window->Event->srcElement->{id}; }); }
Thank you very much for any assistance. I don't want to
execute a JavaScript function to populate some HTML elements to get the
information in a round about way but I could I guess.
Michael
|