H
harold.gimenez
Hi group,
I am trying to change the selection of an ASP Dropdownlist just like
"Orange" is selected here:
http://www.w3schools.com/js/tryit.asp?filename=try_dom_option_selected
The following works fine on IE:
document.getElementById('dropdown').options.selected = 0 //
selects the first option
But, I need this to work on other browsers as well.
I started by adding the "id" attribute to the ASP:ListItem in order to
access them by their ID (like in the W3C example above), but it does
not get rendered in the produced HTML page.
How could I achieve this in a crossbrowser, standard way?
Thanks.
I am trying to change the selection of an ASP Dropdownlist just like
"Orange" is selected here:
http://www.w3schools.com/js/tryit.asp?filename=try_dom_option_selected
The following works fine on IE:
document.getElementById('dropdown').options.selected = 0 //
selects the first option
But, I need this to work on other browsers as well.
I started by adding the "id" attribute to the ASP:ListItem in order to
access them by their ID (like in the W3C example above), but it does
not get rendered in the produced HTML page.
How could I achieve this in a crossbrowser, standard way?
Thanks.