[Javascript] Searching a drop-down list.

Shawn Milo ShawnMilo at runbox.com
Thu Jan 6 13:02:30 CST 2005


Mike,

I agree with your assessment. The reason I get away with it here 
is that the list has always been completely loaded into the select box
on the page load, so I'm not adding anything by doing this, except for, of course,
putting those arrays in, which adds to the size of the HTML the browser
receives. Also, the issues list is well under 100, and the callers list
is somewhere around 500. Relatively small numbers for this function to handle.u

If it was a perfect app, the add page would probably be a series of 
tiny page loads, each taking a teeny amount of information, and allowing
each following page to have a small number of highly relevant options.

As for my "bag of tricks," I don't have them organized as such, but I 
have a body of work on the intranet I maintain at work, and I run 
a plain or regex search with TextPad when I'm looking for a snippet.

I do keep a '_toolbox' directory on my flash drive, with all kinds of goodies,
but the JS directory is very sparse. I guess I should do something about that.
I would be honored if others found my code stash valuable to them, and 
would, of course, happily release it all for free.

I'll do a bit of searching, and throw together a list of things I have, both
"found" and of my own creation. If enough people are interested, I'll
extract them from their current environments and put them into 
easily-understandable stand-alone snippets.

Thank very much for your comments.

Shawn 

>    In a fat-client desktop interface to SQL data, the 'best practice' would be to allow the user 
> to enter their search criteria, then retrieve the results for display.  In the case of potentially 
> millions of records narrowing on the first keypress to hundreds of thousands, the lag to retrieve 
> and display the results is too prohibitive.  
>    I have to admit this incremental searching routine gives immediate feedback at each keystroke 
> and i'd give it 'props' for being interactive and interesting.  If you ever had so much data that 
> it was not scaling well (large dataset + slow machine, resource issues, etc)  then you might adopt 
> a plainer approach.  This is not a tweak suggestion, but another option to consider for management 
> of really huge datasets.  
> 
>    Overall, it's pretty cool...  Do you have a collection of wiki pages displaying those 
> techniques in your bag of tricks that you care to share?
> 



More information about the Javascript mailing list