Ron Piterman
2005-Sep-22 07:41 UTC
[Rails-spinoffs] Autocompleter: displaying resuts-div on focus
Hi, In the last two days I posted 4 different questions to this forums, but no single answer... Is it personal ? ;-) Anywayz I continue trying, so maybe I have luck this time... The question: in an autocomplete component, is it possible to make the results-div apear when the text field is getting focus? Thanx in advance, Ron
Thomas Fuchs
2005-Sep-22 07:52 UTC
[Rails-spinoffs] Autocompleter: displaying resuts-div on focus
Maybe a Event.observe(''input_field_id'', ''focus'', function(){ Element.show (''results_div_id'') }); works, but it probably makes the autocompleter do weird things. Otherwise, you have to change how the autocompleter works by overriding/changing its methods. Thomas Am 22.09.2005 um 15:19 schrieb Ron Piterman:> Hi, > In the last two days I posted 4 different questions to this forums, > but no single answer... Is it personal ? ;-) > Anywayz I continue trying, so maybe I have luck this time... > > The question: in an autocomplete component, is it possible to make > the results-div apear when the text field is getting focus?
Maninder, Singh
2005-Sep-22 08:18 UTC
[Rails-spinoffs] Autocompleter: displaying resuts-div on focus
Now that you answered this one :) can you also tell me if there is a way in which instead of using the token (,) we could automatically have a comma (,) inserted after an entry is populated? This way user can keep typing, selecting and typing... -----Original Message----- From: rails-spinoffs-bounces@lists.rubyonrails.org [mailto:rails-spinoffs-bounces@lists.rubyonrails.org]On Behalf Of Thomas Fuchs Sent: Thursday, September 22, 2005 5:00 PM To: rails-spinoffs@lists.rubyonrails.org Subject: Re: [Rails-spinoffs] Autocompleter: displaying resuts-div on focus Maybe a Event.observe(''input_field_id'', ''focus'', function(){ Element.show (''results_div_id'') }); works, but it probably makes the autocompleter do weird things. Otherwise, you have to change how the autocompleter works by overriding/changing its methods. Thomas Am 22.09.2005 um 15:19 schrieb Ron Piterman:> Hi, > In the last two days I posted 4 different questions to this forums, > but no single answer... Is it personal ? ;-) > Anywayz I continue trying, so maybe I have luck this time... > > The question: in an autocomplete component, is it possible to make > the results-div apear when the text field is getting focus?_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Thomas Fuchs
2005-Sep-22 08:43 UTC
[Rails-spinoffs] Autocompleter: displaying resuts-div on focus
You have to change controls.js for that, too. For most use cases, that''s not a desired thing (where additional entries are more optional than the standard case). Thomas Am 22.09.2005 um 13:54 schrieb Maninder, Singh:> Now that you answered this one :) can you also tell me if there is > a way in which instead of using the token (,) we could > automatically have a comma (,) inserted after an entry is populated? > This way user can keep typing, selecting and typing...
Ron Piterman
2005-Sep-22 09:24 UTC
[Rails-spinoffs] Autocompleter: displaying resuts-div on focus
Thanks, Could you supply a small sample of how to do that ? As a java-script novice (and java expert) I find this not sooo clear... Cheers, Ron ????? Thomas Fuchs:> Maybe a > > Event.observe(''input_field_id'', ''focus'', function(){ Element.show > (''results_div_id'') }); > > works, but it probably makes the autocompleter do weird things. > > Otherwise, you have to change how the autocompleter works by > overriding/changing > its methods. > > Thomas > > > Am 22.09.2005 um 15:19 schrieb Ron Piterman: > >> Hi, >> In the last two days I posted 4 different questions to this forums, >> but no single answer... Is it personal ? ;-) >> Anywayz I continue trying, so maybe I have luck this time... >> >> The question: in an autocomplete component, is it possible to make >> the results-div apear when the text field is getting focus? > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > >