I have list box: mylistbox
I can get the listbox:
var listBox = document.getElementById("mylistbox");
but now I want to get the index of an option based on the value so I can select it dynamically.
So say I dynamically set the options to:
Now I want to select the value "22" in the options and have that show in the list box the one that is selected.
var po = listBox.getElementsByTagName("option");
var myvalue = po[myvar].value;
And I can't seem to dump 'po' because all I get is [object].
And is there a solid book that thoroughly covers issues like this?