I want to create an autocomplete text field that when you type in (some of) a users name, it pops up the portrait image associated to that user on the left hand side, which can then be dragged away in to a Sortable.Droppable element adding that member to your team... I can get the results to display, but not where I want them. They are always in a list below the textbox. 1) possible? 2) Do the results HAVE TO BE in UL / LI format? 3) How Do I get the results to appear on the left in a seperate div rather than just appearing below the textbox every time. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Alex Duffield
2007-Jun-14 14:05 UTC
Re: A more fancy autocomplete using scriptaculous and ajax
I would think you would need to make your own "Auto-complete" . Just have the input filed call a ajax.updater on key up. That way it will fire after every new letter input. ______________________________________________________________________ Alex Duffield ❖ Principal ❖ InControl Solutions . http:// www.incontrolsolutions.com On 14-Jun-07, at 6:29 AM, junkmate wrote:> > I want to create an autocomplete text field that when you type in > (some > of) a users name, it pops up the portrait image associated to that > user > on the left hand side, which can then be dragged away in to a > Sortable.Droppable element adding that member to your team... > > I can get the results to display, but not where I want them. They are > always in a list below the textbox. > > 1) possible? > 2) Do the results HAVE TO BE in UL / LI format? > 3) How Do I get the results to appear on the left in a seperate div > rather than just appearing below the textbox every time. > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Dave Crane
2007-Jun-14 19:26 UTC
Re: A more fancy autocomplete using scriptaculous and ajax
Hi junkmate, Yes, it does require you return <li> tags, but you can customise those. There''s an example of a customised autocompleter here: http://demo.script.aculo.us/ajax/autocompleter_customized It doesn''t use images, but each <li> contais several <divs>, so you can add <img> tags in there too. As to the popup always appearing below the text input field, that looks from the code to be implemented in the default options.onShow callback (controls.js lines 64-70). If you pass in a custom onShow function, you can override that. I haven''t tried this myself, but worth giving it a go? Cheers, Dave On Thursday 14 June 2007 14:29, junkmate wrote:> I want to create an autocomplete text field that when you type in > (some > of) a users name, it pops up the portrait image associated to that > user > on the left hand side, which can then be dragged away in to a > Sortable.Droppable element adding that member to your team... > > I can get the results to display, but not where I want them. They are > always in a list below the textbox. > > 1) possible? > 2) Do the results HAVE TO BE in UL / LI format? > 3) How Do I get the results to appear on the left in a seperate div > rather than just appearing below the textbox every time. > > >-- Author: Prototype & Scriptaculous in Action, Ajax in Practice, Ajax in Action --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---