Results 1 to 4 of 4

Thread: Issue with Webbrowser raise Click

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    429

    Issue with Webbrowser raise Click

    Hey,

    I am coming down with strange problem... we want to fill a field and hit on go button.. we are able to fill and hit go button.. but there is something else involved here... There is a event that fires on keypress on that page.. here is that exact code

    Code:
    <input id="MainContent_txtDomain" class="" type="text" onkeypress="return clickButton(event,'MainContent_btnGo')" name="ctl00$MainContent$txtDomain" autocomplete="off"></input>
    so now i want to raise that event.. how can i do it? i use htmlagility pack for doing all process.
    Never Give UP! It is Mindset that brings you success!

  2. #2
    Hyperactive Member
    Join Date
    Nov 2008
    Location
    PA
    Posts
    365

    Re: Issue with Webbrowser raise Click

    we want to fill a field and hit on go button.. we are able to fill and hit go button..
    The keypress event looks like all it does is click the go button. If, like you said, you already hit the go button, why do you need to raise the event for the keypress?
    Not sure about the agilitypack, but the webbrowser allows you raise events, IE:
    Code:
    wb.Document.GetElementById("elementID").InvokeMember("*")

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    429

    Re: Issue with Webbrowser raise Click

    Quote Originally Posted by detlion1643 View Post
    The keypress event looks like all it does is click the go button. If, like you said, you already hit the go button, why do you need to raise the event for the keypress?
    Not sure about the agilitypack, but the webbrowser allows you raise events, IE:
    Code:
    wb.Document.GetElementById("elementID").InvokeMember("*")
    actually it detects if key is pressed or not.. so when we enter a value it raises that event..

    so now i sorted that issue.. my next issue is that i raise a click even and also click the go button manually but ti doesnt works do i need to enable any other property in web browser control to enable scripts?
    Never Give UP! It is Mindset that brings you success!

  4. #4
    Hyperactive Member
    Join Date
    Nov 2008
    Location
    PA
    Posts
    365

    Re: Issue with Webbrowser raise Click

    How are you entering the value? Are you doing it manually? Via code?

    As for your "click event", do you see a click event attached to that element? Are you sure you're clicking the right element on the page?

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