I’m working on an asp.net application that allows the user to update data for a series of days. The data is presented as a table:
Date – Active – Active Promotion
04/11/11 – yes – listbox with 360 entries
05/11/11- yes – listbox with 360 entries
06/11/11 – yes – listbox with 360 entries
…
04/02/12 – yes – listbox with 360 entries
Now, the table can have from 90-700 rows (eg allow entry for 90-700 days) and the select box has 360 entries (12,000 characters). So, for a 3 month display, I get the page size of 90 * 12,000 = 1MB and this increases to 8.4MB for a 2 year display.
I can see that the problem is the many repeated listbox . I have thought of the following approaches, perhaps people can suggest improvements or refinements:
- Have each listbox populate itself when clicked (reduces initial page size but user may have to wait for drop down to populate)
- Have one ‘real’ listbox and many ‘fake’ listbox . when the user clicks on a ‘fake’ listbox the ‘real’ listbox is then displayed, the selected value is then stored in a hidden field
- get the client to cleanup the data so there aren’t 300+ options in each box
If the options are the same for every listbox, I would definitely suggest auto-populate with javascript on clicking. I’ve used this solution before for exactly the same reason, and there is no perceptible delay in popping up the select list, and the original page loads way faster.
Also Firefox used to have a bug when handling lots of large select elements, and the javascript populate when necessary solution also sidestepped that.