deleted

Has Ajax is just an extended language to previous Javascript and such you can use Javascript to have the page auto refreshed or a certain DIV in this occasion would be you're auto updating feed.

That is if you know how to do it...
 
Assuming that "Show more comments" is a link.

Javascript action:
PHP:
function getMoreComments() {
var amount = $('#streamcntw').val();
$.ajax({
  url: "ajax/comment.php?aid=" + $('#articleid').val() + "&amount=" + amount
}).done(function(html) {
  $("#comments").append(html);
});
$('#streamcntw').val(amount + 5);
}

Code:
<a href="#comments" onclick="getMoreComments()">Show more comments</a>


And for the php side would be something like this:
http://pastebin.com/NZzhE7xm
 
Last edited:
Back