how do i refresh the contents of a div 'comment thread' without disturbing users input on the text field.Like in Facebook
comment section ? I am using Php
, Jquery
, Javascript
.
var auto_refresh = setInterval(
function autorefresh()
{
var ipo = document.getElementById('commentarea');
$('#commentarea').load('processing.php');
},
100);
The processing.php includes a while loop where all the div i.e. main content,like,comment is present.What i want to do is when user clicks on comment a div comes under it where other's comment are displayed and text field is displayed for users comment,similar to Facebook's comment view. How do I refresh the contents of the comments without disturbing the user's comment field.