I have something like this:
select = document.getElementById(\"select\");
select.onchange = function(){
alert(this.value); //returns the selected value
a
This will work.
select = document.getElementById("select");
select.onchange = function(){
alert(this.value); //returns the selected value
alert(this.innerHTML); //returns the entire select with all the options
var options = this.getElementsByTagName("option");
var optionHTML = options[this.selectedIndex].innerHTML;
alert(optionHTML); //this is what I want, but it works now
};