Re: Set a drop down to a certain selection
- From: XP <XP@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 16 May 2008 11:02:01 -0700
Hi Tom,
Sorry, it is in an HTA, and your solution works perfectly, thanks!
"Tom Lavedas" wrote:
On May 16, 11:26 am, XP <X...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:.
I need to set the selection in a drop down box (not a combo) to a certain
selection based upon a value in a variable:
dropdown1.Value = myVar
doesn't work; what is the correct syntax to set the selector?
Thanks much in advance.
What is the application? There are a lot of 'dropdowns' out there
with different object models. The HTML/DHTML Select object is one
such dropdown and it uses a 'selected' property to do what you
want ...
for each opt in dropdown.options
if lcase(opt.text) = lcase(myVar) then opt.selected = true
next
Other applications may use a different approach.
Tom Lavedas
===========
http://members.cox.net/tglbatch/wsh/
- References:
- Set a drop down to a certain selection
- From: XP
- Re: Set a drop down to a certain selection
- From: Tom Lavedas
- Set a drop down to a certain selection
- Prev by Date: active directory question
- Next by Date: Re: interact with user dialobbox user e passord
- Previous by thread: Re: Set a drop down to a certain selection
- Next by thread: active directory question
- Index(es):
Relevant Pages
|
|