Managaging the loading of data for selection

Hi,

I have a ‘client’ field for a table project and I was going to use a select field to show all of the companies but as I understand it loading all of those records could be problamatic. Second choice was a popup dialog with a searchable list which would pass the id back to the form.

Is there a better way to do this or am I on the right track. Suggestions are very welcome.

Thanks, James

Welcome, James, to Sitepoint. Thanks for providing a clear and accurate description of your problem. With the level of expertise here I am certain you will get a number of insightful responses.

To better clarify your situation, How many clients do you expect to be in the list of choices?
Is this data local on the client machine (is this a proprietary app where i have installed a client portion as opposed to a traditional Web app)?

Thanks PT,

I am teaching myself html, CSS, PHP & mysql. Have not looked at javascript yet…so from that you can deduce it is a web app, nothing proprietary. It most likely will be hosted on a shared hosted or similar. Clients could run from a couple of hundred to a couple of thousand. That said this is obviously only one example of its use. I know there are 10’s of thousands of products I will need to find elsewhere in the app.

James

To really help you, we’ll need to understand much more on where the performance will be hit. Do you mean the display select fields or retrieving the select fields from back-end? Most of the performance issue is back-end and to solve this, you can do some smart caching. In terms of how… this is hard since we don’t know what your back-end storage mechanism is. If it’s really the front-end then you can use AJAX based selection field. If you don’t know then google “ajax autocomplete”. There’s tons of examples.