I've got a view with a few exposed filters. Is there a way to change the submit speed of the ajax request? So that rather than submitting the request after every key press, it waits until no keypress has been registered for say 500ms before submitting the request? I'm having problems, especially on mobile, where you might type "ar" in the exposed filter, but end up seeing the results for "a", with the filter set back to "a".

function do_search(e) {
  search_timer = setTimeout(function() {
    var v = $("#YOUR_INPUT_VAR_ID").val();
  }, 500);
| improve this answer | |
  • Basic idea for seems right, but I didn't try it. I found the timer in ctools/js/auto-submit.js. Since I wanted to make the change everywhere, so I cheated and modified things that, rather than add something custom. So, in a roundabout way, thanks for the lead. – Kyle Schmidt Mar 7 '12 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.