Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

Select Multiple object, selection detection

$
0
0

Hello there,

I have simple select object with multiple options, which contains several record, like ID, Name. When I am trying to check selection in the loop over all options agains Selected property, I always get False.

var el = document.getElementById('mylist').options; var cnt = 0; for(var i=0; i<el.length; i++) { if(el[i].selected == true) cnt++; alert(el[i].value + ' ' + el[i].selected); }

I tried this with <meta http-equiv="x-ua-compatible" content="IE=EmulateIE9">, but it is the same. My page has

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">

IE version is 11.0.9600.17420

Thanks,

Anton


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>