0

Hello all,

Im new to VB so go easy on me :-D

Im trying to autofill a html form and all textboxes and textarea is working ok.. I now have a problem with a combobox1.

I added the items below to the combobox1. So whenever i choose one of those items it needs to choose the same value on the website dropdownbox.

ComboBox1

DVDR
High Definition
International, Non English

This is the HTML file:

<select name=forum_number id="forum_number">

<option value=""> Choose one.. </option>
<option value=41> DVDR </option>
<option value=98> High Definition </option>
<option value=57> International, Non English </option>
</select>

I tried something like this i found on the web.. But is not dynamic..

Dim htmlselect As HtmlElement = WebBrowser1.Document.All.Item("forum_number")
            For Each opt As HtmlElement In htmlselect.All
                opt.SetAttribute("value", "ComboBox1.Text")
                opt.InnerText = "ComboBox1.Text"

Hope someone can help me!

Greetz

Edited by Atmos1234: n/a

2
Contributors
1
Reply
3
Views
5 Years
Discussion Span
Last Post by AndreRet
0

try the following -

''Change this Dim htmlselect As HtmlElement = WebBrowser1.Document.All.Item("forum_number") to ----

Dim htmlselect As HtmlElement = WebBrowser1.Document.All("forum_number").Value = Combobox1.Text
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.