I have a div where I want to show 6 images. Address of these images are coming from server. I am using this code.
updateImageDiv = function() {
$.ajax({
type : 'POST',
url : 'slider.php',
dataType : 'json',
data: {
p_CustomerName : "Davide"
},
async:true,
success : function(data){
$("#slider").html(data);
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
alert("Error: "+errorThrown);
}
});
document.write(count);
};
This code update my div tag. But I want to send requests to server after each 5 seconds which will update the div tag again if data is different. Because Image addresses which are in database are changing automatically. So I want to update the div tag as soon as these addresses change in my database. Is it possible?
Thanks in advance