On Mar 28, 2007, at 8:53 AM, apparker wrote:
> Another question, why does the demo page's source say,
> "autocomplete="off"?
Autocomplete from the browser messes seriously with this sort of thing,
it fights the system by filling in the last thing you typed into a
field of that particular name, which may or may not be what you want.
The autocomplete functions all submit one character at a time to your
server script (unless configured otherwise), which gives the effect of
narrowing down the search as you type, shortening the list to only a
few really good matches. Browser autocomplete would break that
behavior.
>
> And, the demo page doesn't have any parameters after the url:
> type="text/javascript">new Ajax.Autocompleter('contact_name',
> 'contact_name_auto_complete', '/ajax/auto_complete_for_contact_name',
> {})
>
> How does it know what to do?
Because it is using the defaults, which are defined as what (I imagine)
the developers experience says is the 80% use-case. Have a look in the
middle column of the table of available parameters. That shows the
default, i.e.: what you get when you don't pass that parameter at all.
Walter
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---