Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Select list add/remove option
07-16-2007, 04:38 AM #1
- Join Date
- Jul 2007
- Colorado, USA
- Thanked 0 Times in 0 Posts
Select list add/remove option
See the working code at: http://www.everyonepoll.com/poll.php (if you view the source of that page you will see all the (ugly) code.) Also, it does have a username/password field, but you don't need that to see the code in action.
Where, if you select an items in the first dropdown box, the code will remove that item from the other 24 select boxes. The problem is there are 119 select options x 25 boxes to update each time which = slow. Too slow for my tastes.
I know I could check when the form is submitted for duplicate entries, but whynot just take care of that client side? I do check server side after submission anyways, to ensure someone doesn't figure out how to submit the form without these checks to get a team double voted. And "if it ain't broke, don't fix it" sure, but the speed is unbearable to me.
A few facts:
* The list is static. That is, the 119 options to select never changes (except maybe once a year). I can generate it dynamically from a MySQL DB, but it's currently static.
* It takes several seconds for the 25x119 selects to even load, which I think should be near zero as well.
* Selecting an item should take 0.00001 to 1/2 second max to update all other items.
* The problem is much worse in IE than Firefox.
* I've run it on several computers many different times and although the times vary, it's typically 1-3 seconds per selection.
* I understand computer speed and memory and other things will come into play, but on my "high speed" computer, I should be able to achieve the above goals.
If you have any questions, please ask. Thank you in advance. I hope I was clear what I wanted and have given anyone enough info to help me.