How To Handle Javascript On Page With Thousands Of Checkboxes In Ie6
Solution 1:
Granted, I don't know what you're doing, but having 8,000 check boxes on one page seems pretty user-unfriendly to me. Consider adding pagination & filtering to keep the number of check boxes per page under, perhaps, 100?
EDIT - You also seem to think this is an IE6 problem. I'd hazard a guess that any browser would have troubles with the volume you're talking.
DOUBLE EDIT - Okay, after looking over your code, I'm certain the only way to improve speed is to reduce the number of controls on the website. You're not doing anything crazy in the JS.
Solution 2:
Echoing @Matt Grande - you're trying to do something impossible. IE6 runs javascript really, really slowly. It's also going to be proportionally slower on the likely ancient hardware your end-user may be working on. It's damn near impossible to avoid memory leaks no matter what you do. This just isn't a good approach.
If you really need 6,000 checkboxes on a page, then consider an alternative approach. For example, use a single image with all the checkboxes pre-rendered. Capture mouse click events, figure out which box they checked using the mouse position, render a checkmark with VML, and save the information as an array or JSON in a hidden field.
Post a Comment for "How To Handle Javascript On Page With Thousands Of Checkboxes In Ie6"