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 <[EMAIL PROTECTED]> 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@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs