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
-~----------~----~----~----~------~----~------~--~---

Reply via email to