Amit Singh
Amit Singh

Reputation: 1746

Combo box behaviour in IE7

Hi I know its not a good idea but due to one use case I am populating a combo box with more 10000 items. Its behaving very weired in IE7 in all other browsers its working fine in IE7 its taking too much time for downloading the page. Sometime IE7 also hangs up

Is there any known bug with IE7 for this issue.

Thanks, Amit

Upvotes: 0

Views: 375

Answers (2)

Spudley
Spudley

Reputation: 168685

I would suggest abandoning any attempt at having 10k entries in a single select box -- as others have said, it's a user interface nightmare, even if you can solve the problem with it killing the browser (which I don't think you can).

What to do instead?

  1. Break the selection into categories. Then have one <select> box for the category, and have a second <select> get populated according to the category that is picked. This second <select> could be populated via Ajax or a page reload; both techniques are common. Given the quantity of options you want to provide, you may even want to break it down into category and sub-category.

  2. The other alternative (which may be better, given the number of options you're providing) is to implement a Google-style auto-complete. There are a number of easy-to-use Javascript and JQuery scripts out there which allow you to implement this sort of thing without having to write it from scratch - it's almost as easy as writing the select box.
    Here's one for you to try: http://docs.jquery.com/Plugins/autocomplete (but there are plenty of others if you google)

Hope that helps.

Upvotes: 0

Pekka
Pekka

Reputation: 449415

Not sure whether anything can be done to speed this up. One thing to look into would be loading the options dynamically through Ajax, and adding them as DOM nodes to the existing select element. That would at least allow the whole page to load before the rest of the data is fetched.

There are ready-made JS/jQuery-based Ajax combo boxes as well. One with a good loading strategy might yield better results.

I have no experience with them so I can't tell which one is suitable for you, but these seem worth checking out:

Upvotes: 3

Related Questions