This code will send your form on the keyboard
$('#element').bind('keyup', function() {
$('#form').delay(200).submit();
});
In this code, you intercept the submit form and change it with ajax submit
$("#form").submit(function (event) {
event.preventDefault();
$.ajax({
type: "post",
dataType: "html",
url: '/url/toSubmit/to',
data: $("#form").serialize(),,
success: function (response) {
});
});
To use the delay function, you must use jQuery 1.4. The parameter passed to the delay is in milliseconds.
source
share