Topic: No result when input field empty
I have an xajax request which receives data from an input field and a keyup action in js.
These data allows to recover some informations into a database.
Everything works fine except that I would like that the xajax function works when the field is empty, and when the length of the data key in are shorter than 2 chars.
Actually 2 chars at least are required before the process return some results and the process can't return any result if the field is empty.
I've tried onload and onchange actions but it seems to be inefficient.
I have a js function which allows to keep the process on :
function refresh()
{
xajax_afficher();
setTimeout(refresh, 2000);
}
I've looked the code of xajax.inc.php and found :
'allowBlankResponse' => false // I first thought that it was a clue but it's not.
Is there any reason which could explains that an empty field or a field < 2 chars doesn't return any result ?
Regards.