Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

Too many drop down lists in my page

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,

I have too many drop down lists in my page. It is severely hampering my performance.

But one good thing is I think the performance can be increased with the help of some javascript methods. I just want an expert opinion from you folks.

The requirement is pretty simple. I will have 'n' drop down lists and the options in the drop down lists are again the same 'n' values.

Say my <option> tags are "ONE" "TWO" "THREE", "FOUR", i will have four drop down lists with the option values being these one of 4 values. If 4 is the case, things are fine since I will have only 4 x 4 = 16 values. But when the option count is 800 in my case . I am having 800 x 800 = 640000 options in my page!!!
I dont have the pagination option, clients dont want it. Is there a way to address this issue ?

Please advise.

The following is a sample prototype I am working on ..



Thanks,
Bragaadeesh.
 
Sheriff
Posts: 67750
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why are you doing this in JavaScript rather than in a server-side template such as JSP or PHP?

And, your client wants 800+ values in a dropdown? Hardly usable!
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

But when the option count is 800 in my case



Are you serious? The user has to make 800 choices before getting any result? Preposterous, time to rethink your architecture.

Bill
 
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As is quite apparent, 800 options does make the whole thing quite unusuable. In fact, I think that beyond a reasonable number like 20, the options become quite hard to scroll and find.
If you don't want to do things at the server side, you can probably use an AJAX based lookup solution. Ask the user to type a few characters, and retrieve a small list of values which partially/completely match the typed in value.
 
Palkar Bedugo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Anirvan Majumdar wrote:As is quite apparent, 800 options does make the whole thing quite unusuable.



I entirely agree with this. Well, I like your Ajax idea. Thank you guys for your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic