As in the docs, you should provide the URL to a script which will 
return an unordered list of possible matches to the query. Your script 
will need to read in a POST of the same name as your autocompleted form 
field, so if you named the field 'lookup' in your code, your script 
will look for a POST called lookup, take its value, and perform a 
database query. I usually use something like this:

SELECT id, fieldname FROM tablename WHERE fieldname LIKE 
"%heavily_filtered_version_of_lookup%" ORDER BY fieldname ASC LIMIT 
0,20

The return from your script must be a simple, undecorated UL, nothing 
more or less, unless you use some of the more advanced configuration 
options.

Walter

On Jun 13, 2007, at 11:00 AM, Marko Vuksanovic wrote:

>
> I am trying to use scriptaculous autocomplete control in an asp
> application. I have checked out the documentation and was wondering
> what do i need to use as "url" parameter in the syntax below
>
> new Ajax.Autocompleter(id_of_text_field, id_of_div_to_populate, url,
> options);
>
> Thanks in advance,
> M. Vuksanovic
>
>
> >


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to