Search on listview works only 5 seconds because of AJAX reloads the content

Search on listview works only 5 seconds because of AJAX reloads the content

Hi. I have a listview loaded via ajax.It uses the data-filter="true" for search.
The content updates every 5th second using setTimeout. So the search field only works for 5 sec.
How can I get around this?


heres some of my function
    1. function showUser(str)
    2. {
    3. curevent = str;
    4. $('#tests').load('getuser.php?q='+str, function(){$('#tests').listview('refresh');});
    5. $('#eventvalue').val(str);
    6. setTimeout(function(){showUser(curevent);}, 5000);
    7. }
      • Topic Participants

      • jonas