By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,101 Members | 1,387 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,101 IT Pros & Developers. It's quick & easy.

Typing text into FreeTextBox using Webbrowser. HELP!

P: 11
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.Document.getelementByID("ctl1__ctl0_Ma in_Main_ComposeMessa ge1_FreeTextBoxMessage").InnerText = "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!
Mar 27 '07 #1
Share this Question
Share on Google+
3 Replies


100+
P: 149
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.Document.getelementByID("ctl1__ctl0_Ma in_Main_ComposeMessa ge1_FreeTextBoxMessage").InnerText = "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.Document.Forms(0).NameOfField.Value = "Insert Your text"

thanks
ansuman sahu
Mar 27 '07 #2

P: 11
Hi ,

Will this work out.

webBrowser.Document.Forms(0).NameOfField.Value = "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!
Mar 27 '07 #3

P: 11
Hi ,

Will this work out.

webBrowser.Document.Forms(0).NameOfField.Value = "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_ComposeMessage1_FreeTextB oxMessage_htmlEditorArea" style="clear:both;display:none;padding-bottom:1px;">
<textarea id="ctl1__ctl0_Main_Main_ComposeMessage1_FreeTextB oxMessage" name="ctl1__ctl0_Main_Main_ComposeMessage1_FreeTex tBoxMessage" disabled="disabled" style="padding: 0px; width:500px; height: 350px;" class="ctl1__ctl0_Main_Main_ComposeMessage1_FreeTe xtBoxMessage_HtmlBox">Enter Text Here...</textarea>
</div>
Mar 27 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.