Hi, I''m using scriptaculous to provide an auto complete textbox - and it works perfectly - but I was wondering if there was anyway to let users navigate the choices using the keyboard i.e the curor keys as opposed to having to use the mouse? Apart from that it''s perfect! :) Cheers, Pete -- Posted via http://www.ruby-forum.com/.
Kevin Olbrich
2006-May-26 12:58 UTC
[Rails] scriptaculous - auto complete textbox with a drop down
On Friday, May 26, 2006, at 2:45 PM, Pete wrote:>Hi, > >I''m using scriptaculous to provide an auto complete textbox - and it >works perfectly - but I was wondering if there was anyway to let users >navigate the choices using the keyboard i.e the curor keys as opposed to >having to use the mouse? Apart from that it''s perfect! :) > > >Cheers, > > >Pete > > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsI have been using the auto_complete fields and I think they already do. _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.
Pete
2006-May-26 13:18 UTC
[Rails] Re: scriptaculous - auto complete textbox with a drop down
Kevin Olbrich wrote:> On Friday, May 26, 2006, at 2:45 PM, Pete wrote: >> >>Pete >> >> >>-- >>Posted via http://www.ruby-forum.com/. >>_______________________________________________ >>Rails mailing list >>Rails@lists.rubyonrails.org >>http://lists.rubyonrails.org/mailman/listinfo/rails > > I have been using the auto_complete fields and I think they already do. > > _KevinJust tried it on my mac and linux and it works fine... maybe just my IE playing up? :S Different issue now though - I want to update the rest of the form when the user tabs out of the autocomplete box. Normally I''d do this with onBlur() but not sure how to set that up if using the helper methods. Has anyone done this already? Cheers, Pete -- Posted via http://www.ruby-forum.com/.
Kevin Olbrich
2006-May-26 13:26 UTC
[Rails] Re: scriptaculous - auto complete textbox with a drop down
On Friday, May 26, 2006, at 3:17 PM, Pete wrote:>Kevin Olbrich wrote: >> On Friday, May 26, 2006, at 2:45 PM, Pete wrote: >>> >>>Pete >>> >>> >>>-- >>>Posted via http://www.ruby-forum.com/. >>>_______________________________________________ >>>Rails mailing list >>>Rails@lists.rubyonrails.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> I have been using the auto_complete fields and I think they already do. >> >> _Kevin > >Just tried it on my mac and linux and it works fine... maybe just my IE >playing up? :S > >Different issue now though - I want to update the rest of the form when >the user tabs out of the autocomplete box. Normally I''d do this with >onBlur() but not sure how to set that up if using the helper methods. >Has anyone done this already? > > >Cheers, > > >Pete > >-- >Posted via http://www.ruby-forum.com/. >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/railsHow about a field observer? _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.
Damon Hill
2006-Jul-12 19:16 UTC
[Rails] Re: scriptaculous - auto complete textbox with a drop down
Pete- I am curious about this as well. I have several text_field_with_auto_complete fields in some forms that are heavy data entry intensive. The auto complete fields allow the user to start typing a name and then when chosen the address is automatically filled in for them. Everything works great if the user uses the moust to select the item from the auto complete list. However, if the user types and the correct item is highlighted in the auto complete list, they want to be able to TAB to the next field and the application complete the address just as if they had selected the entry with the mouse. Here is an example of my TFWAC: <%= text_field_with_auto_complete :supplier, :company_name, { :size => "45" }, :after_update_element => "function(element,value){" + remote_function( :url => { :action => :get_supplier_address }, :with => "''supplier=''+$F(''supplier_company_name'') + ''&order_type=''+''T''") + "}" %> Is there a way to tell the TFWAC to use the highlighted item in the auto complete list when the user hits the TAB key? Any help would be appreciated on this. Thanks, ~d On 26 May 2006 13:25:30 -0000, Kevin Olbrich < devlists-rubyonrails@devlists.com> wrote:> > > On Friday, May 26, 2006, at 3:17 PM, Pete wrote: > >Kevin Olbrich wrote: > >> On Friday, May 26, 2006, at 2:45 PM, Pete wrote: > >>> > >>>Pete > >>> > >>> > >>>-- > >>>Posted via http://www.ruby-forum.com/. > >>>_______________________________________________ > >>>Rails mailing list > >>>Rails@lists.rubyonrails.org > >>>http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> I have been using the auto_complete fields and I think they already do. > >> > >> _Kevin > > > >Just tried it on my mac and linux and it works fine... maybe just my IE > >playing up? :S > > > >Different issue now though - I want to update the rest of the form when > >the user tabs out of the autocomplete box. Normally I''d do this with > >onBlur() but not sure how to set that up if using the helper methods. > >Has anyone done this already? > > > > > >Cheers, > > > > > >Pete > > > >-- > >Posted via http://www.ruby-forum.com/. > >_______________________________________________ > >Rails mailing list > >Rails@lists.rubyonrails.org > >http://lists.rubyonrails.org/mailman/listinfo/rails > > How about a field observer? > > _Kevin > > -- > Posted with http://DevLists.com. Sign up and save your mailbox. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ~d www.razorpress.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060712/cadf1b3e/attachment.html
Kevin Olbrich
2006-Jul-12 20:45 UTC
[Rails] Re: scriptaculous - auto complete textbox with a drop down
On Wednesday, July 12, 2006, at 2:16 PM, Damon Hill wrote:>Pete- > >I am curious about this as well. >I have several text_field_with_auto_complete fields in some forms that are >heavy data entry intensive. >The auto complete fields allow the user to start typing a name and >then when >chosen the address is automatically filled in for them. >Everything works great if the user uses the moust to select the item from >the auto complete list. >However, if the user types and the correct item is highlighted in the auto >complete list, they want to be able to TAB to the next field and the >application complete the address just as if they had selected the >entry with >the mouse. > >Here is an example of my TFWAC: > ><%= text_field_with_auto_complete :supplier, :company_name, { :size => "45" >}, :after_update_element => "function(element,value){" + > remote_function( :url => { :action => :get_supplier_address }, >:with => "''supplier=''+$F(''supplier_company_name'') + ''&order_type=''+''T''") + >"}" %> > >Is there a way to tell the TFWAC to use the highlighted item in the auto >complete list when the user hits the TAB key? > >Any help would be appreciated on this. > >Thanks, >~d > > >On 26 May 2006 13:25:30 -0000, Kevin Olbrich < >devlists-rubyonrails@devlists.com> wrote: >> >> >> On Friday, May 26, 2006, at 3:17 PM, Pete wrote: >> >Kevin Olbrich wrote: >> >> On Friday, May 26, 2006, at 2:45 PM, Pete wrote: >> >>> >> >>>Pete >> >>> >> >>> >> >>>-- >> >>>Posted via http://www.ruby-forum.com/. >> >>>_______________________________________________ >> >>>Rails mailing list >> >>>Rails@lists.rubyonrails.org >> >>>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >> I have been using the auto_complete fields and I think they >>already do. >> >> >> >> _Kevin >> > >> >Just tried it on my mac and linux and it works fine... maybe just my IE >> >playing up? :S >> > >> >Different issue now though - I want to update the rest of the form when >> >the user tabs out of the autocomplete box. Normally I''d do this with >> >onBlur() but not sure how to set that up if using the helper methods. >> >Has anyone done this already? >> > >> > >> >Cheers, >> > >> > >> >Pete >> > >> >-- >> >Posted via http://www.ruby-forum.com/. >> >_______________________________________________ >> >Rails mailing list >> >Rails@lists.rubyonrails.org >> >http://lists.rubyonrails.org/mailman/listinfo/rails >> >> How about a field observer? >> >> _Kevin >> >> -- >> Posted with http://DevLists.com. Sign up and save your mailbox. >> _______________________________________________ >> Rails mailing list >> Rails@lists.rubyonrails.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > > >-- >~d >www.razorpress.com > > >_______________________________________________ >Rails mailing list >Rails@lists.rubyonrails.org >http://lists.rubyonrails.org/mailman/listinfo/rails >On my dev box (Firefox, OS X), the tab button tells the TFWAC to use the selected item as you might expect. _Kevin -- Posted with http://DevLists.com. Sign up and save your mailbox.