I am trying to have an Ajax form submit when the value within a textbox changes, which i have done successfully using Keyup:
$('#Search').keyup(function () {
$(this).parents('form').submit();
return false;
});
The problem is, the texbox loses focus so the user cannot keep typing. How would I edit this so the #Search textbox remains focused, so that the user can carry on typing, but still have the Ajax function call on each keyup?
refocus on the search textbox:
or alternatively (what i would prefer), make the ajax call without submitting the form: