How Do I Access Textarea Element?

Piaget

Member
Joined
Mar 15, 2008
Messages
7
Programming Experience
Beginner
Hi, I have a webbrowser defined on my form in which I access a third party website in which I have to enter information that is stored on a database on my end. the information needs to be entered into a textarea element. The textarea element is defined as follows on the page:

<textarea tabindex="1" cols="80" rows="10" name="U2FsdGVkX1-GEw5P1q8FZNvHu_TXdnF1TjuTfXE0X3-h0hshB19hTxXcdfgbgss7"></textarea>

How can I enter this information? your help will be greatly appreciated.

Piaget:)
 
VB.NET:
Me.WebBrowser1.Document.GetElementsByTagName("textarea")(0).InnerText = "hello"
 
Webform information entry

Hi, I have a webbrowser defined on my form in which I access a third party website in which I have to enter information that is stored on a database on my end. the information needs to be entered into an input element. The input elemens are defined as follows on the page:

<input tabindex="1" size="80" id="U2FsdGVkX18fOmpsOrQ2tpjti76r3_kkyz1vNWQB8HN_yZt1fpKfAycd5Yf5gght" name="U2FsdGVkX18fOmpsOrQ2tpjti76r3_kkyz1vNWQB8HN_yZt1fpKfAycd5Yf5gght" value="">

<input tabindex="1" type="text" name="FromEMail" size="80" value="" maxlength="60"><br><span class="req"><b>Type email address again:</b></span><br>

<input tabindex="1" type="text" name="ConfirmEMail" size="80" value="" maxlength="60"><br>


How can I enter this information? your help will be greatly appreciated.

Piaget :)
 
The same technique should work, did you try?
 
Hi John,

Yes, the same technique worked when substituting 'textarea' with 'input'. For some reason, the collection started with the number 3-5 and 7-9 on the form and I was testing it with 0,1 and then just gave up thinking that i am doing something wrong.

But thanks again, and I am trying to figure something else out right now and I might have another question within the next few days.

Thanks,

Piaget :)
 
Also HtmlElement has GetElementsByTagName method, this can help narrowing the search of the tag tree. For example there could be loads of input tags in document and you're only interesting the in the ones in for example second table, so you would get the tables first, then the inputs from the second table object.
 
Back
Top