Hello Tom, First:
Autocompleter.Local is LOCAL, not Ajaxified. So it doesn't integrate with a back-end, unless you back-end preloads all data in the page, which is inefficient on large datasets. Autocompleter.Local builds its own HTML, without any extras beyond ul/li and <strong>-highlited matching portions. Your stylesheet can work on rules such as #mnemo_list ul and #mnemo_list li, since you have your container element around this list. If you need to provide more than simple <li> elements (e.g. "informal" blocks, images, etc.) you need to either: 1) write your own selector callback function (which takes the Autocompleter.Local object as an argument, on whose options property you can iterate). This method is responsible for the whole search/completion/filtering/formatting behavior, which is a hassle. OR 2) use Ajax.Autocompleter, and build the XHTML ul/li fragment on the server side, as per the Ruby example you quote from the Wiki. You're then responsible for the code creation *server-side*, which is way more efficient for large datasets. You would then bind to a specific servlet of yours, which would create the XHTML fragment based on the passed parameter(s). Look into the "parameters" and "defaultParams" options, and into the "callback", er... callback :-) This thing is *way* customizable (I wrote a JS subclass that applied an XSLT transform over an XML result to produce the desired ul/li structure, so there's no limit to how you can tweak it!). 'HTH -- Christophe Porteneuve aka TDD [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 -~----------~----~----~----~------~----~------~--~---
