Dear all, I''d like to post input field a short delay after last key press (similar like a delay in autocomplete field). Is there anything already done somewhere, maybe some kind of a streched-down autocomplete field just for such purpose? If no, have anyone an idea how can I do that (as a not very knowledgeable in JavaScript)? Thanks for any help Janko
Javascript has a handy function for doing just this: setTimout Anyplace that you''d normall execute a function: if (things_are_in_order){ run_my_function(); } you can just delay that a bit: if (things_are_in_order){ setTimeout("run_my_function()", 1000); } notice that the name of the function you want to run is in quotes (it''s passed as a string). Also, the number that follows is how_many_seconds_you_want_to_wait * 1000. So a half second is 500, quarter second is 250, and so on. Hope this helps, - Danger On 3/1/06, Janko Mivšek <janko.mivsek-E3fUNmXwn2NDlGyqqv13OA@public.gmane.org> wrote:> > Dear all, > > I''d like to post input field a short delay after last key press (similar > like a delay in autocomplete field). Is there anything already done > somewhere, maybe some kind of a streched-down autocomplete field just > for such purpose? If no, have anyone an idea how can I do that (as a not > very knowledgeable in JavaScript)? > > Thanks for any help > Janko > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
What you need is exactly the patch that I posted to this mailling list a month ago, and got no comments on. I can find you the patch but it won''t make a lot of sense to you, I''d ask the dev team to put my patch in to the CVS, then get a copy of it. I''ll re-send the patch after this E-mail -Rob Janko Mivšek wrote:> Dear all, > > I''d like to post input field a short delay after last key press (similar > like a delay in autocomplete field). Is there anything already done > somewhere, maybe some kind of a streched-down autocomplete field just > for such purpose? If no, have anyone an idea how can I do that (as a not > very knowledgeable in JavaScript)? > > Thanks for any help > Janko > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Hi Rob, I''m looking back for your patch. I this a right one? [PATCH] Allow generic autocompleter (Ajax.Watcher) 13feb06 http://threebit.net/mail-archive/rails-spinoffs/msg00215.html Thanks Janko Robin Haswell wrote:> What you need is exactly the patch that I posted to this mailling list a > month ago, and got no comments on. I can find you the patch but it won''t > make a lot of sense to you, I''d ask the dev team to put my patch in to > the CVS, then get a copy of it. > > I''ll re-send the patch after this E-mail > > -Rob > > Janko Mivšek wrote: > >> Dear all, >> >> I''d like to post input field a short delay after last key press >> (similar like a delay in autocomplete field). Is there anything >> already done somewhere, maybe some kind of a streched-down >> autocomplete field just for such purpose? If no, have anyone an idea >> how can I do that (as a not very knowledgeable in JavaScript)? >> >> Thanks for any help >> Janko >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >-- Janko Mivšek Svetovalec za informatiko EraNova d.o.o. Ljubljana, Slovenija www.eranova.si tel: 01 514 22 55 faks: 01 514 22 56 gsm: 031 674 565
Yeah that''s the one, but I did re-forward this yesterday as well :-) Janko Mivšek wrote:> Hi Rob, > > I''m looking back for your patch. I this a right one? > [PATCH] Allow generic autocompleter (Ajax.Watcher) 13feb06 > http://threebit.net/mail-archive/rails-spinoffs/msg00215.html > > Thanks > Janko > > > Robin Haswell wrote: >> What you need is exactly the patch that I posted to this mailling list >> a month ago, and got no comments on. I can find you the patch but it >> won''t make a lot of sense to you, I''d ask the dev team to put my patch >> in to the CVS, then get a copy of it. >> >> I''ll re-send the patch after this E-mail >> >> -Rob >> >> Janko Mivšek wrote: >> >>> Dear all, >>> >>> I''d like to post input field a short delay after last key press >>> (similar like a delay in autocomplete field). Is there anything >>> already done somewhere, maybe some kind of a streched-down >>> autocomplete field just for such purpose? If no, have anyone an idea >>> how can I do that (as a not very knowledgeable in JavaScript)? >>> >>> Thanks for any help >>> Janko >>> _______________________________________________ >>> Rails-spinoffs mailing list >>> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >> >> _______________________________________________ >> Rails-spinoffs mailing list >> Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >> >
Seemingly Similar Threads
- In place editing and external control
- character encoding in ajax submit
- Tabulation with ENTER key
- [PATCH] maint.mk: remove error_message_period check
- Bug or feature: using "ANY" as a generic field class (was: '[R] Is there a (virtual) class that all R objects inherit from?)