04-20-2005, 03:16 PM
I am trying to get the value on a HTML combo list as seen on the screen. The HTML for the list is:
<option value="123">option a</option>
<option value="234">option b</option>
if I create a macro to set the index to 2 "option b" shows up on the screen but when I use the following code "234" is returned:
MSHTML.IHTMLElement el=htm("SELECT" "FP_cboList" "" "Internet Explorer" 0 0 0x121)
MSHTML.IHTMLSelectElement elsel=+el;
elsel.selectedIndex=2
str wh=elsel.value
out wh
Is there a way to get "option b" to be returned?
Thanks,
Carl
<option value="123">option a</option>
<option value="234">option b</option>
if I create a macro to set the index to 2 "option b" shows up on the screen but when I use the following code "234" is returned:
MSHTML.IHTMLElement el=htm("SELECT" "FP_cboList" "" "Internet Explorer" 0 0 0x121)
MSHTML.IHTMLSelectElement elsel=+el;
elsel.selectedIndex=2
str wh=elsel.value
out wh
Is there a way to get "option b" to be returned?
Thanks,
Carl