How can I submit a form when a field (in this case the form has only one field) loses focus?
I tried this, but it does not work:
$("form").submit();
UPDATE
I forgot to mention that the form was created using jquery:
$("div").html('<form action="javascript:void(0)" style="display:inline;"><input type="text" value="' + oldValue + '"></form>');
This is probably why he does not obey, I think, because events are not observed.
source
share