Typing text into FreeTextBox using Webbrowser. HELP!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wxscooter
    New Member
    • Mar 2007
    • 11

    Typing text into FreeTextBox using Webbrowser. HELP!

    Trying to have webbrowser in VB6 open up a web page and fill out information automatically for me.

    Having trouble getting text into a FreeTextBox. My code is:

    WebBrowser1.Doc ument.getelemen tByID("ctl1__ct l0_Main_Main_Co mposeMessa ge1_FreeTextBox Message").Inner Text = "It works!"

    For some reason, it doesn't do anything. Can I put text into a FreeTextBox this way or am I coding it wrong?

    Any help is greatly appreciated!
  • ansumansahu
    New Member
    • Mar 2007
    • 149

    #2
    Originally posted by wxscooter
    Trying to have webbrowser in VB6 open up a web page and fill out information automatically for me.

    Having trouble getting text into a FreeTextBox. My code is:

    WebBrowser1.Doc ument.getelemen tByID("ctl1__ct l0_Main_Main_Co mposeMessa ge1_FreeTextBox Message").Inner Text = "It works!"

    For some reason, it doesn't do anything. Can I put text into a FreeTextBox this way or am I coding it wrong?

    Any help is greatly appreciated!

    Hi ,

    Will this work out.

    webBrowser.Docu ment.Forms(0).N ameOfField.Valu e = "Insert Your text"

    thanks
    ansuman sahu

    Comment

    • wxscooter
      New Member
      • Mar 2007
      • 11

      #3
      Originally posted by ansumansahu
      Hi ,

      Will this work out.

      webBrowser.Docu ment.Forms(0).N ameOfField.Valu e = "Insert Your text"

      thanks
      ansuman sahu

      Thanks for the help! Unfortunately, I tried it and got the same result. The blinking cursor dissapears when the command is run. Makes me think that I've got the wrong ID for the textbox. I'll keep trying using your method.

      If anyone has any more ideas, please let me know. Thanks!

      Comment

      • wxscooter
        New Member
        • Mar 2007
        • 11

        #4
        Originally posted by ansumansahu
        Hi ,

        Will this work out.

        webBrowser.Docu ment.Forms(0).N ameOfField.Valu e = "Insert Your text"

        thanks
        ansuman sahu

        OK, I found the line of code that is responsible for the text in the FreeTextBox, but I can't understand why nothing is showing up with the code you gave me...

        <div id="ctl1__ctl0_ Main_Main_Compo seMessage1_Free TextBoxMessage_ htmlEditorArea" style="clear:bo th;display:none ;padding-bottom:1px;">
        <textarea id="ctl1__ctl0_ Main_Main_Compo seMessage1_Free TextBoxMessage" name="ctl1__ctl 0_Main_Main_Com poseMessage1_Fr eeTextBoxMessag e" disabled="disab led" style="padding: 0px; width:500px; height: 350px;" class="ctl1__ct l0_Main_Main_Co mposeMessage1_F reeTextBoxMessa ge_HtmlBox">Ent er Text Here...</textarea>
        </div>

        Comment

        Working...