I may be looking at this all wrong.
But, I am trying to use the jquery ui autocomplete.
I want to pass it a url and it will get the suggestions from there.
my questions are
1: how do i specify the url?
2: how do i format the response?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This should get you started with specifying the URL part.
First create an input field to attach the autocomplete plugin to.
Then use this javascript to attach the autocomplete to the input box just created.
The request uri will be something like this…
selectionrepresents the selection made in autocomplete.Now on your server side you need to parse the uri and use the value of parameter
termto do whatever you want – search the database for the selected choice, or something else.You should format your response like this…
The suggestions should be on a new line (separated by
\n)