PDA

View Full Version : Lightweight alternative to HTML Select tag?



ddurose
Aug 20th, 2007, 04:51 PM
Hi, I am looking for a lighter weight alternative to the HTML Select tag (i.e. dropdownlist). Here's why: I have a page that has to load hundreds (up to 500) of select boxes at once and it's taking forever to load them. I figure that the sheer number of dropdownlists that have to be rendered on the client-side is bogging the pageload down. Does anyone know of a lightweight alternative that I could use that might take less time to load up? I did find something at http://support.milonic.com/demos/select_box/mm_setSelected.htm that might work, but I'm not sure. Any alternative I implement still needs to be able to support the onchange dom event.

Thanks,
Dave Durose

Bill Posters
Aug 20th, 2007, 06:15 PM
Select menus are likely to be the most light-weight option, particularly when the alternative demands scripting, as support for form controls are built into the fabric of the browser.

Why does the page that you're dealing with require so many options to be available in one go? Couldn't you stagger the options, so that only a certain amount are available at a time?

It's also worth bearing in mind that the onchange event when used on select menus can lead to certain usability issues for those using assistive technology - not to mention the inherent problems of making certain aspects reliant upon the presence of javascript.

Have you considered whether the form will/may be used by those using assistive technology or non-js browsers? Is it a factor in the page's possible audience?