not able to handling ajax request from a small chat module
问题 i am developing a simple chat module for my client, but not able to handle loop from setInterval() Here is the js code from which i sending the request to get the data from the database function getData(){ jQuery.ajax({ url: '../../get_data.php', data: 'to=<?php echo $_SESSION['ch_usr_id']; ?>', cache: false, success: function(data){ jQuery('<div>'+data+'</div>').appendTo("#ch-data-con"); setInterval("getData()", 5000); } }); } and here is the get_data.php file which produce the data