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

    WebBrowser Input Problem

    Hi, i'm trying to make my program login into www.lockerz.com, and use txtEmail.text, and txtPass.text for the email and password feilds, the email feild works fine and input's the text from txtEmail into the email feild, but the password feild doesn't seem to work, i get runtime error 91, if any of you could take a look at the site's html, and see if you could get it working i'd appreciate it, thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: WebBrowser Input Problem

    Email works, but PW doesn't because of the tag

    Code:
    		<input id="email-email" type="text" name="handle" value="" />
    					
    					<noscript><label for="password-password" id="combo-label" class="no-js">Combination</label></noscript>
    										
    				    <input id="password-clear" type="text" value="Combination" />
    					
    					<input id="password-password" type="password" name="password" value="" />
    											<input id="sumbitLogin" class="signin" type="submit" value="Sign In" />
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2010
    Posts
    2

    Re: WebBrowser Input Problem

    Is there anyway to get it to work?

  4. #4
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: WebBrowser Input Problem

    If we told you, they'd ban you, and just change it again. We can't help break the rules of a site
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  5. #5
    Join Date
    Mar 2010
    Posts
    26

    Re: WebBrowser Input Problem

    The following works in VB.Net 2008.

    Code:
     
    WebBrowser1.Navigate("www.lockerz.com") ' Follow this with some code to wait for page ready
    WebBrowser1.Document.Forms.Item(0).GetElementsByTagName("INPUT").Item("handle").InnerText = TextBox1.Text
    WebBrowser1.Document.Forms.Item(0).GetElementsByTagName("INPUT").Item("password").InnerText = TextBox2.Text
    WebBrowser1.Document.GetElementById("sumbitLogin").InvokeMember("click")
    I'm sure it will work in VB 6.

    If you want I will post the VB.Net project for you.

  6. #6
    Join Date
    Mar 2010
    Posts
    26

    Re: WebBrowser Input Problem

    Quote Originally Posted by dglienna View Post
    If we told you, they'd ban you, and just change it again. We can't help break the rules of a site
    BTW please do no destroy the earth with this as I have no where else to Live. !!!!

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