javascript some how stop working
earler this code work fine.but don't know suddenly stop working..after
changing location for code.
give error :
- Uncaught TypeError: Cannot read property 'options' of undefined (in chrome)
- no element found (in firefox)
var inputs = document.getElementsByTagName("select"); //get array of
select tag
var sSrnti = inputs[0].options[inputs[0].selectedIndex].value; //get
selected value of first list
var sType = inputs[1].options[inputs[1].selectedIndex].value;//get
selected value of second list
var sStatus = inputs[2].options[inputs[2].selectedIndex].value;//get
selected value of third list
please help me.. Thanks
No comments:
Post a Comment