0

i am trying to read selected value from dropdown list( ddDocTypes) . So in the IE I am able to get value using Form1.ddDocTypes.options(Form1.ddDocTypes.selectedIndex).innerText. But the same code give me "Form1.ddDocTypes.options undefined" error in Chrome.

Any suggestions !!

1 Answers1

0

I don't know if you are just trying to get the value of the selected from the dropdown, but this is how you do it in plain javascript (guessing from your tag)

var e = document.getElementById("ddDocTypes");
var inner = e.options[e.selectedIndex].text;
var value = e.options[e.selectedIndex].value;
Nebulosar
  • 1,727
  • 3
  • 20
  • 46