Xavier,
Thanks for your reply. And i DID come across your plugin today :). So
will try to implement it soon. However, I also want to understand why
it is not working in Safari. If i remove the li and ul tags, the
autocomplete results dont show up. The partial is rendered if i look
into the dvlpmnt log but the results dont show up (in any browser).
Ive tried removing the div tags, and showing just contact_name in the
results without any html tags around it. Nothing works. I am running a
protect_from_forgery filter for the auto_complete method alone in the
controller if you notice. Will that affect this in any way? I put this
filter in because the authenticity token was not being passed with the
call. Would really appreciate assistance in this! Thanks!

On Sep 29, 1:38 pm, "Xavier Noria" <[EMAIL PROTECTED]> wrote:
> On Mon, Sep 29, 2008 at 7:13 AM, Vinay <[EMAIL PROTECTED]> wrote:
> > 1.User starts typing
> > 2.Autocomplete kicks off and returns matching strings in relevant
> > attributes and Model.
> > 3.User scrolls down options and selects the one he/she wants.
> > 4.Selected option appears on the text box
> >   4a.Text appearing in text box may be different from that shown to
> > user in options list. Like in the Scriptaculous
> > customised_autocomplete demo.
> > 5.When the form is submitted -> The autocomplete field may be either a
> > virtual attribute or otherwise. The field is for a belongs_to
> > associated model so ultimately, the foreign key must be set (in my
> > case, its contact_id for a Create/Edit Reminder form).
>
> Just in case, model_auto_completer addresses this use case. You
> autocomplete a belongs_to association and get an ID or else (if
> :allow_free_text), get a new value.
>
> > _list.html.erb
> > <ul>
> > <%- for contact in @contacts do -%>
> >  <li>
> >    <div><%=h contact.name %></div>|<div><%=h contact.email %></div>|
> > <div><%=h contact.company.name %></div>
> >  </li>
> > <%- end -%>
> > </ul>
>
> Try removing the DIVs somehow, sometimes even spaces around a LI
> content may result in weird behaviour in some browsers. Once you get
> it working, add stuff incrementally.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to