Technically, it doesn't matter what format it's in. As long as its
output is an unordered list you're good to go. For example, you could
use PHP to connect to a database and extract information about contact
names and then display them like this:
<ul>
<li>Doe, Jane</li>
<li>Kees, David</li>
<li>Smith, John</li>
</ul>
As long as your output is formatted thusly, the AutoCompleter should do
the rest. Therefore, you can use PHP, XML, ColdFusion, HTML, whatever,
as long as you have an unordered list when you're done.
-- Dash --
apparker wrote:
> I'm still not sure what you mean by the url... the demo page's source
> says it is using "/ajax/auto_complete_for_contact_name". What file is
> this pointing to? It doesn't have an extension. Do I point it at an
> XML file? Text file? What format does it have to be in?
>
> On Mar 28, 2:20 am, Christophe Porteneuve <[EMAIL PROTECTED]> wrote:
>
>> apparker a écrit :
>>
>>
>>> I'm new to js and rails. I've created a page and i'm trying to
>>> implement the autocomplete. I do'nt know where the data comes from.
>>> The demo says it comes from "/ajax/auto_complete_for_contact_name" -
>>> what is that? I downloaded some of the files from scriptaculous and
>>> they have a url which is an html file that is in the shape of XML.
>>> Where exactly does the info come from that populates the div?
>>>
>> With Autocompleter.Local, it comes from a JS array in your page.
>> With Ajax.Autocompleter, it is provided by a URL in your app, which
>> takes one parameter (the default name is that of your text field, but
>> can be customized), and produces a <ul>/<li> list of results.
>>
>> It's all there, with all the necessary details:
>>
>> http://wiki.script.aculo.us/scriptaculous/show/Ajax.Autocompleter
>>
>> The wiki also provides you with basic styling for that result, so you
>> obtain a decent aspect.
>>
>> --
>> Christophe Porteneuve a.k.a. TDD
>> "[They] did not know it was impossible, so they did it." --Mark Twain
>> Email: [EMAIL PROTECTED]
>>
>
>
> >
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---