Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Too many drop down lists in my page

 
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.
 
Marshal
Posts: 67425
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • 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!
 
Author and all-around good cowpoke
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
 
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.
 
The moustache of a titan! The ad of a flea:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic