• Post Reply Bookmark Topic Watch Topic
  • New Topic

Too many drop down lists in my page  RSS feed

 
Palkar Bedugo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • 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.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • 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!
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • 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
 
Anirvan Majumdar
Ranch Hand
Posts: 261
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!