I’m trying to get the values of various text and dropdown boxes from a webpage, which are already filled out (displaying previously saved values).
I can get the value of the text boxes in the console using:
var mtext = document.getElementById("ID").value;
console.log(mtext);
But when I apply the same code to a customComboBox it returns nothing. (not ‘undefined’ just nothing)
The data is right there on the screen, but I can’t figure out why it wont return what is displayed.
When I get the selected index using:
var mtext = document.getElementById("ID");
var ind = mtext.selectedIndex;
console.log(ind);
It returns -1