Help... options added to Select element from clientside automation not working properly with Code Be

T

TCook

Hey All,

I am using the code below to dynamically add options to a select element on
a web page
For Each ThisItem In SomeItems
lstDropDown = docDocument.getElementById("MySelect")
optNewListItem = docDocument.createElement("option")
optNewListItem.innerText = ThisItem .Name
lstDropDown.appendChild(optNewListItem)
Next

When I try to access the options in the code behind class, it keeps telling
me that the select control is empty even though the controls visibly show.
This code is below:
For Each ThisItem In Me.cboAttachments.Items
If ThisItem.Selected = True Then
'Do something here
End If
Next

Why aren't they registering properly?

Any thoughts?

Any help greatly needed & appreciated.

Best,

TC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top