I use a external js-file for the autocompleter, because i like a small
markup.
The autocompleter works well, but if i select a suggest, it will not
updated in the input-field.
Look what i mean on http://www.eltern-fragen.de
Here the code of the external script:
document.observe(''dom:loaded'', function() {
new Ajax.Autocompleter(''suche'',
''AutocompleteChoices'', ''search.php'',
{
method: ''post'',
minChars: 3,
updateElement: function(item) { /* no update */ }
});
});
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---
Hi, I''ve never used the Autocompleter, but just looking at your params to it made me think you were explicitly disabling the update. And indeed you are, details here: http://github.com/madrobby/scriptaculous/wikis/ajax-autocompleter "updateElement: ...This function is called INSTEAD OF the built-in function that adds the list item text to the input field..." (my emphasis) Hope this helps, -- T.J. Crowder tj / crowder software / com On Jun 7, 7:49 am, pawel <pawelfrit...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> I use a external js-file for the autocompleter, because i like a small > markup. > The autocompleter works well, but if i select a suggest, it will not > updated in the input-field. > > Look what i mean onhttp://www.eltern-fragen.de > Here the code of the external script: > > document.observe(''dom:loaded'', function() { > new Ajax.Autocompleter(''suche'', ''AutocompleteChoices'', ''search.php'', > { > method: ''post'', > minChars: 3, > updateElement: function(item) { /* no update */ } > }); > > });--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
You''re right! I delete the line -> update... and it works. I''m so blind. Thank you. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---