Help - Search - Members - Calendar
Full Version: Setting value in combobox with option groups
HTMLHelp Forums > Programming > Client-side Scripting
JonWayn1970
I am trying to automate a website. I need to select an item in a select element that has optgroup tags in it. Usually i would encounter select elements without optgroup and i would set the selectedItem property to a number corresponding to the value i want. In this case however, there are option groups. How is it done. Thank you
pandy
I don't think the optgroups matter. But maybe I misunderstand.
JonWayn1970
QUOTE(pandy @ Apr 6 2021, 07:48 AM) *

I don't think the optgroups matter. But maybe I misunderstand.

You are right. SelectedIndex works except it pushes the index off by the optgroup positions. Thank you
pandy
Oh, good then. smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2021 Invision Power Services, Inc.