Invoking JavaScript event handler in Internet Explorer by python/win32com
Florian Fredegar Haftmann
fredegar at haftmann-online.de
Mon Mar 3 13:58:12 EST 2003
R.Marquez schrieb:
> Not sure, but I think that you can invoke it by the index of the
> button:
>
> class ButtonHandler(html.HTMLButtonElementEvents):
>
> def __init__(self, button, oldevt = None, idx):
> self.idx = idx
>
> def Ononclick(self):
>
> [... any action ...]
> if self.oldevt:
> doc.[self.idx].click()
>
> If not, try finding out a way to do this. I us this code to click on
> the third button on the first form of a page:
>
> doc.forms[0][3].click()
Thank you very much, but this works only for onClick-events
>>Of course you could use the .click method, but since I'd like to do
>>the same procedure with other event handlers, too, that is'nt useful.
Florian
More information about the Python-list
mailing list