Results 1 to 8 of 8

Thread: Help with web forms

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Help with web forms

    Hi So i am trying to make a program that registers and account on a website and i am having a few problems, first ill post my code:

    Code:
    WebBrowser1.Document.GetElementById("date_month").InnerText = ComboBox1.Text
            WebBrowser1.Document.GetElementById("date_day").InnerText = ComboBox2.Text
            WebBrowser1.Document.GetElementById("date_year").InnerText = TextBox1.Text
            WebBrowser1.Document.GetElementById("login").InnerText = TextBox2.Text
            WebBrowser1.Document.GetElementById("character_name").InnerText = TextBox3.Text
            WebBrowser1.Document.GetElementById("password").InnerText = TextBox4.Text
            WebBrowser1.Document.GetElementById("confirm").InnerText = TextBox5.Text
            WebBrowser1.Document.GetElementById("email").InnerText = TextBox6.Text
    Here are my problems:

    1. When i inpute the month, it doesnt input it, it just makes the combobox on the website smaller for some reason

    2. I cant get the email working because you must put your birhtday before it shows where to put your email, obviously fixing the first problem should fix this.

    3. There are 2 radiobuttons on the website, for a boy and a girl and I have 2 radiobuttons in my form, however I have exactly no idea how to program it to change.

    Your help is greatly appreciated.

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Re: Help with web forms

    Bump? any1 plz!!!

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Help with web forms

    this has been asked a number of times....
    http://www.vbforums.com/showthread.p...=fill+web+form

    searching the forums for "fill web form" turned up a lot of threads. So you don't waste your time, I think the first one that will be of some use is: VS 2010 Web Browser - Auto Fill In started by Noximana

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Re: Help with web forms

    This still doesnt answer my question about the drop-down menu/combobox.

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Help with web forms

    you need to be setting the value of the item once you have it... not the innertext.

    as in this example:
    WebBrowser1.Document.DomDocument.GetElementById("username").Value = TextBox1.Text
    and this one:
    WebBrowser1.Document.All("vb_login_username").Value = TextBox1.Text

    and I appologize... I meant to post the link to the search results page... not to a specific thread.

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Re: Help with web forms

    Ok edit I got those working, now just the radio buttons

    Im using this code:

    If RadioButton1.Checked = True Then
    DirectCast(GetCurrentWebForm.item("character_gender", 1), mshtml.HTMLOptionButtonElement).checked = True
    Else
    DirectCast(GetCurrentWebForm.item("character_gender", 0), mshtml.HTMLOptionButtonElement).checked = True
    End If

    But I get these errors:

    GetCurrentWebForm is not declared
    Type 'mshtml.HTMLOptionButtonElement' is not defined.
    Last edited by TYDIRocks; Jan 5th, 2010 at 05:49 PM.

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Re: Help with web forms

    BUMP! xD

  8. #8

    Thread Starter
    New Member
    Join Date
    Jan 2010
    Posts
    6

    Re: Help with web forms

    Bump

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