Link to home
Start Free TrialLog in
Avatar of thenelson
thenelson

asked on

insert text into HTML select field

I want to enter the text selection for the following select field:
<select name="Payerid" id="Payerid" class="text" name="Payerid">
		<option value="383">Aetna Healthcare</option>
                ...

Open in new window

Using VBA, I know I can use:
      IE.getElementById("Payerid").Value = "383"
but there about 100 options so I don't want to keep track of the values (which are meaningless to me) or changes the website developers make.

So is there a  way to enter the text into the select field?
I tried:
     IE.getElementById("Payerid").Text = "Aetna Healthcare"
but that didn't work.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of IrogSinta
IrogSinta
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thenelson
thenelson

ASKER

IrogSinta,

Do you mean:
   IE.getElementById("Payerid").Value = sOptionValue
Yes I did.  I'll correct it now.  Did you try that?
not yet
This works but I decided to go another direction.

Thanks