|
-
January 4th, 2005, 10:33 AM
#1
How can I catch form submission events with a C# BHO?
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
-
May 4th, 2008, 12:21 AM
#2
Re: How can I catch form submission events with a C# BHO?
I am developing Automatic Login & Password Management Toolbar and
I bumped into the same problem , so I managed to solve it and posted article about it.
the article is at : http://www.codeproject.com/KB/dotnet...ntHandler.aspx
also you can get the sources at : http://www.logonce.com/code_samples/HtmlEventProxy
Enjoy :
Sharon Salmon
http://www.logonce.com
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|