CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    2

    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

  2. #2
    Join Date
    May 2008
    Posts
    1

    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
  •  





Click Here to Expand Forum to Full Width

Featured