Anyone? This is the very last step in this implementation and im not
able to find a solution by myself.

On Oct 3, 10:38 am, Vinay <[EMAIL PROTECTED]> wrote:
> @Xavier
> I used a solution i had for auto_complete for the results. But there
> are a few issues like the options list does not go away when the user
> selects an option. I either need to press "esc" or click on some other
> part of the page for that to go away. And i cant use the mouse to
> select an option from the options list. it shows up on the text field
> and then automatically deletes itself if i use the mouse.
> Also, for this, <%=
> belongs_to_auto_completer :reminder, :contact, :name%> can you show me
> an example of how to use :after_update_element. The functionality i
> need is this. Once an option is chosen, using the chosen contact, i
> want to query the contact's employer's details and display them on an
> adjacent div. Something like @company =
> current_user.companies(params[:contact.company_id]) where im expecting
> contact to be passed in by after_update_element. I understand its a JS
> function. I dont know anything about JS. Least of all, writing
> functions in JS.
> I realise im slowly getting confused with my requirements and which
> methods to use here. Pl excuse me if i am not making myself clear.
> Thanks for all the help!
>
> On Oct 1, 6:44 pm, "Xavier Noria" <[EMAIL PROTECTED]> wrote:
>
> > On Wed, Oct 1, 2008 at 12:38 PM,Vinay<[EMAIL PROTECTED]> wrote:
> > > For those interested, include an "informal" class for the element you
> > > don't want to get in your text field.
> > > :) works well.
> > > @Xavier, Thanks for pointing me in the right direction with that! How
> > > can i customize model_auto_completer_result to show more than one
> > > attribute in the results? like contact name, contact email? Hoping you
> > > can hep me with that.
>
> > If you founded a solution for auto_complete that one should work,
> > because model_auto_completer is really a wrapper around auto_complete,
> > and that showing results is completely delegated to the original
> > plugin.
>
> > If you'd like to update the view elsewhere with that additional data
> > from the selected item there's a hook :after_update_element that
> > receives among other arguments the very selected LI element. (Details
> > inhttp://model-ac.rubyforge.org/).
--~--~---------~--~----~------------~-------~--~----~
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