RileyMPk
January 4th, 2005, 09:33 AM
Hello. I'm programming a browser helper object that modifies HTML elements on a web page. It first grabs the current HTML document as an IHTMLDocument2 (doc), and then grabs the first form element via:
IHTMLFormElement form = (IHTMLFormElement) doc.forms.item(0,0);
From there I am able to find individual members of the form and modify their values. However, I would also like to call a function when the user clicks on the form "submit" button. I have tried using the IHTMLFormElement:: onsubmit() method with no success; does anyone know how to catch it as an event and signal a function? Or is it only for modifying the HTML onsubmit property, and do I need to modify the form button code itself in order to signal within C#?
Thanks very much!
Regards,
Mike Smith
IHTMLFormElement form = (IHTMLFormElement) doc.forms.item(0,0);
From there I am able to find individual members of the form and modify their values. However, I would also like to call a function when the user clicks on the form "submit" button. I have tried using the IHTMLFormElement:: onsubmit() method with no success; does anyone know how to catch it as an event and signal a function? Or is it only for modifying the HTML onsubmit property, and do I need to modify the form button code itself in order to signal within C#?
Thanks very much!
Regards,
Mike Smith