> How can i select multiple values in select box
> programmtically? I tried with selectedIndex but
> it is selecting the last one of them. I should be
> able to select muliple values?
>
> How can i select multiple values programmatically
> in the example given below (If select box is with
> "multiple" )?
>
> Is there is any other property like "selectedIndex"
You can set the "selected" property to "true" for each individual option
which you want to select:
if (myselect.options[i].value == someval) {
myselect.options[i].selected = true;
}
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
phone: 202-797-5496
fax: 202-797-5444
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics.
http://www.fusionauthority.com/signup.cfm