I use select controls for jQuery AutoComplete.
Because jQuery Auto complete does not filter server return data, my cfquery returns thousands records to auto complete which has performance issue.
here is my code to have my list and cfquery.
My query returns thousands recrods and jQuery auto complete does not filter the records. I am looking a way to limit records return from user type on the dropdown box
I would like to know is it possible to have my cfquery smart enough to get only records I need for jQuery auto complete.
Your help and information is great appreciated,
<select name="Mylst" id="Mylst" >
<cfif (isDefined("form.MyID") AND form.MyID EQ MySP.MyID)
I think here you are following wrong approach:
- You are loading all options of the select box by ColdFusion then applying jQuery auto complete ovet the select element.
I think the best approach would be:
- Define a selection element:<select name="Mylst" id="Mylst" ></select>
- Bind jQuery auto complete to the select element.
- Load option to the select box when some one types some thing / some one clicks on that.
Again, if that select box contins options which changes very rarely then you can applying caching in server side for fatser processing.
Hope it will help you!