Problems showing results

Key's Avatar


04 May, 2011 01:41 AM

I am having a hard time getting the AutoSuggest to show the list of items. Everything works and functions, but the drop down always says there are no records. The jquery I use is:

$(".contactsSuggest").autoSuggest("/_script/autoSuggest.php",{selectedItemProp: "CONTACT_NAME", selectedValuesProp: "CONTACT_ID", extraParams: "&table=contact"})

My server-side code is getting the data from the database just fine. It is putting in the json header, then using PHP's json_encode() to encode the array into json. A resulting JSON response to a query to the script is formatted like so:

[{"CONTACT_NAME":"Contact 1","CONTACT_ID":"23"},{"CONTACT_NAME":"Responsible Party 1","CONTACT_ID":"24"}]

I watch the AJAX requests in FireBug, so I know the data is getting to the script and back to the page, and the JSON is also correctly formatted according to the jsonLint.

I am at a loss...and it is probably something very simple, so thank you for any help given.

  1. 1 Posted by Key on 04 May, 2011 02:13 AM

    Key's Avatar

    Never mind - I figured it out, I just needed to add the searchObjProps param.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:


Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac