Filtering by keywords
What kind of code would I be looking at? Would anyone be willing to help me work through this?
Where is your so called 'Large List' located ?
(A) Is it in some database, at server side ?
(B) or is it HTML table contents ?
If its option (A), then you need to pass the filter parameters to the server for processing it and then return back the required subset.
If its option (B), then you are lucky enough. I have recently wrote a solution for the same. Its available online at - Data Analyzer: HTML table to Chart From this article, you can bypass the "Chart" section, and simply use the utility to filter your data.
Let me know if you have any problem in using that code...
Hope it helps you out...
Okay, I should elaborate. I'm not looking to display data in a chart or anything like that. I'm looking at a sort of linkedin search where if you type in an industry and/or location, the next page will display all the people that fit the search. As of right now there is no list and I need to create it, so I am looking for the best way to do that.
if you are going to have more than 100 or so items, i would recommend creating a DB to store the information. that way, you can later re-group on the fly as needed, for example by place, by rating, by name, by age, etc...
you can then use html to show the DB's data on the web.
typically this is done with php>html (semantic) -or- php>JS>html (ajax).
if you say "The next page", that seems to imply the first combo, since ajax can all run at once without reloading. it's a balancing act: searching local data is going to be faster than searching remote data, but sometimes there's too much data to load it all up-front. a phone book fits in JS, no problem, but google's index? not even slightly.
the DB itself can create the specific selections, you simply turn the result list into something people want to look at and use.
now, most browsers themselves include a powerful DB (webSQL or indexedDB), but those are pretty complex beasts and you don't need them for the task described.
you can do it client side if you have say, less than 2MB of data in whole. if it's really good/rare data people might wait upfront for 5-10MB of JSON, if they are going to see several views once it loads up. after that, it's time to buy a webplan that includes a DB so you can dish out result lists instead of full tables. This is slower each time than client-side searching, but quicker upon page landing.
and of course, just for confusion, most pro sites these days use hybrids: you store all the data server side, but deliver 5 pages of results on a search, letting the client paginate/re-order those results as needed, lowering traffic on the server and enabling instant table resorts...