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

IE11 fast clearing of large dropdown/select

$
0
0

I have read a lot of semi-related posts and am still having real issues dynamically clearing a big dropdown select in IE11 (1000+ items) quickly without error, no matter what I try.  This issue does not show up in Chrome and other browsers...

Try 1: Jquery .empty().  This does the trick but works slowly creating a lot of time lag.

Try 2: 
var dd = document.getElementById('dropdown');
dd[0].innerHTML = '';

Try 3: 
document.getElementById('dropdown').options.length=0;

What's really troubling about 2 and 3 is that they will work fine with a small list but not a large one.

It also times out if I try .remove() of each element in the list.

Has anyone found a good, clean solution to this?  I have created a dynamic auto-populate and the issue is that I need to be able to quickly empty the dropdown and repopulate it based on keyword matching against a large string array.

Thank you.


Viewing all articles
Browse latest Browse all 3527

Trending Articles



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