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.

Re: No result when input field empty

This is not the usual behaviour. Could you post some code?

Ed

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: No result when input field empty

I'm in debug mode since the beginning of the afternoon and it seems that the length is not in case, this is the value of the input field which is the problem.
In fact, when the field is empty, xajax select every field in my database and one of these fields must create a problem.

Is it possible that a HTML special char like &#039; can return an error in xajax within a database + xajax code ?

If the special char is not involved I will post my code...

Thank you !

Re: No result when input field empty

Don't think the amper can bother anything...

XAJAX doesn't do anything database wise. It just acts as an agent between the browser nd the server.

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: No result when input field empty

Ty ed, the problem is always not solved atm but I had to move on another project.
Ofc no sooner I will come back on this project, I'll update this topic smile