vb.net html combobox

Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
9 posts Page 1 of 1
Contributors
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

vb.net html combobox
M1z23R
This topic was a help, but i need new help with html combobox ...

I have now this combobox on site
Code: Select all
<select id="highscoreOffset" name="highscoreOffset" class="styled">
														<option selected="" value="0">1-100</option>
														<option value="100">101-200</option>
														<option value="200">201-300</option>
														<option value="300">301-400</option>
														<option value="400">401-500</option>
														<option value="500">501-600</option>
														<option value="600">601-700</option>
														<option value="700">701-800</option>
														<option value="800">801-900</option>
														<option value="900">901-1000</option>
														<option value="1000">1001-1100</option>
														<option value="1100">1101-1200</option>
														<option value="1200">1201-1300</option>
														<option value="1300">1301-1400</option>
													</select>
<input type="hidden" name="sort" value="loot">
<input type="hidden" name="searchUser" value="">
When comboboxs item gets changed it refresheses page - reloads table items, i used this topic to set comboboxs item, but nothing reloads :/ Any help ?
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: vb.net html combobox
mandai
That code will set the selected index. You can use this to set an item's text:
Code: Select all
        Dim element As HtmlElement = WebBrowser1.Document.GetElementById("highscoreOffset")
        element.Children(5).InnerText = "test" 'set the 6th item's text to test
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: vb.net html combobox
M1z23R
This just changes items text :/ I want to "Invoke" item click or something like that :) I can change index, but no php post is made when i change it with element.setatribute("selectedindex","5")
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: vb.net html combobox
mandai
Nothing in the sample code deals with reloading the page/posting data.
You could handle the onChange JavaScript event if you want to do that.
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: vb.net html combobox
M1z23R
is that possible with VB ?
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: vb.net html combobox
mandai
Yes, that would be simple to do.
You could either insert/assign your own JavaScript function or you could use HtmlElement.RaiseEvent if the element's event already has an attached script.
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: vb.net html combobox
M1z23R
can i give you "web form" html code or something ? I really don't know how to do that :/
User avatar
mandai
Coding God
Coding God
Posts: 2585
Joined: Mon Apr 26, 2010 6:51 pm

Re: vb.net html combobox
mandai
You will also need a server side script, plus you will need to define what you are trying to send in the post data.
User avatar
M1z23R
VIP - Donator
VIP - Donator
Posts: 622
Joined: Tue Sep 28, 2010 4:55 pm

Re: vb.net html combobox
M1z23R
i didn't mention this at the beggining :/ I am sorry for waste of time :/
I want to make automatic combobox change on already existing site, it has its own scripts and things, i don't want to make one :/ On that site, when i change - user click combobox item, it reloads items in table, but when i use vb to change index, it only changes index and nothing happens, no reload. I think i am now almost :) clear enough, thanks for help in this topic, but i need a way ti invoke event on index change.
9 posts Page 1 of 1
Return to “Tutorial Requests”