Hi all,
PROBLEM
I am trying to select an option within a dropdown list in internet explorer but cannot seem to access the 'select' tagname with all syntax
SOURCE CODE OF INTERNET PAGE
(here is actually '<' but did not put in as webpage does not display properly)select id = "selectlist" name = "selectlist" class = "c23_normalText">
<OPTION selected value="1">(here is actually '<' but did not put in as webpage does not display properly)This is Option 1 </OPTION>
<OPTION selected value="2">(here is actually '<' but did not put in as webpage does not display properly)This is Option 2 </OPTION>
</SELECT>
WHAT I TRIED SO FAR
I have tried the following syntax to select Option 1 but to no avail:
~ "With appIE
.document.forms.Item("selectlist").Value = "1"
(I keep getting the error "Runtime error '91'. Object variable or With block variable not set)
~ Also tried "getelementsbytagname("selectlist") but also could not access
Hope someone can help on this! Thanks!
PROBLEM
I am trying to select an option within a dropdown list in internet explorer but cannot seem to access the 'select' tagname with all syntax
SOURCE CODE OF INTERNET PAGE
Code:
<SELECT class=c23_normalText id=selectlist name=selectlist> <OPTION value=1>This is Option 1</OPTION> <OPTION value=2 selected>This is Option 2</OPTION></SELECT>
<OPTION selected value="1">(here is actually '<' but did not put in as webpage does not display properly)This is Option 1 </OPTION>
<OPTION selected value="2">(here is actually '<' but did not put in as webpage does not display properly)This is Option 2 </OPTION>
</SELECT>
WHAT I TRIED SO FAR
I have tried the following syntax to select Option 1 but to no avail:
~ "With appIE
.document.forms.Item("selectlist").Value = "1"
(I keep getting the error "Runtime error '91'. Object variable or With block variable not set)
~ Also tried "getelementsbytagname("selectlist") but also could not access
Hope someone can help on this! Thanks!
Last edited: