1
I need a table that is updated every instant automatically, like the facebook timeline that updates itself.
I think in jquery you can do this, someone has some idea?
1
I need a table that is updated every instant automatically, like the facebook timeline that updates itself.
I think in jquery you can do this, someone has some idea?
2
Yes it is possible to do with jquery and javascript, as in the example below:
jquery:
var req = 0;
$(document).ready(function () {
update();
});
function update() {
req++;
$.ajax({
type: "POST",
url: '/echo/html/',
data: {
html: 'Requisição: ' + req,
delay: 0
},
success: function (data) {
$('div').html(data);
}
});
}
setInterval(function () {
update();
}, 3000);
See working on Jsfiddle.
The Long Polling technique would be better, take a look at this analysis: http://answall.com/questions/10496/an%C3%A1lise-sobre-c%C3%B3digo-ajax/10507#10507
Browser other questions tagged php javascript jquery
You are not signed in. Login or sign up in order to post.
Look for long Polling technique with PHP + AJAX, should help you solve the problem.
– Filipe Moraes
take a look at this example I created and see if it’s more or less this http://jsfiddle.net/nydoz2mn/
– Paulo Saldanha da silva
Check out this post: http://answall.com/questions/10496/an%C3%A1lise-sobre-c%C3%B3digo-ajax/10507#10507
– Filipe Moraes
rs, I thought it was a chat system, time line.... if it is, it would be something like: http://jsfiddle.net/r4kofh4h/
– MarceloBoni