aspose file tools
The moose likes Performance and the fly likes Too many drop down lists in my page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Performance
Reply Bookmark "Too many drop down lists in my page" Watch "Too many drop down lists in my page" New topic
Author

Too many drop down lists in my page

Bragadeesh Jegannathan
Greenhorn

Joined: Oct 24, 2009
Posts: 2
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

Joined: Jan 10, 2002
Posts: 56230
    
  13

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!


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12271
    
    1
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

Java Resources at www.wbrogden.com
Anirvan Majumdar
Ranch Hand

Joined: Feb 22, 2005
Posts: 261
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.
Bragadeesh Jegannathan
Greenhorn

Joined: Oct 24, 2009
Posts: 2
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Too many drop down lists in my page
 
Similar Threads
get all from select multiple
JSP variable typical problem
How to display value in combo box using AJAX
problem in selecting second arraylist from mysql database
Choose drop down list option with more than one character?