Below is a function that extracts the old wall posts of users 16 at a time and adds each fragment 16 to the end of the current list in a div called "sw1".
It works great, except when there is currently a wall block that contains a video / embedded object that is currently being played. When we press the button that calls the function below while playing the object in sw1, the function at the bottom seems to delete the entire contents of sw1 and then reset it.
Is it possible to change the function below so that it simply adds new data to the end of sw1, rather than replacing all the contents, killing any objects that are currently playing?
function fetch_older_wallposts(u,lim){
var xhr = getXMLHttpRequest();
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 0)) {
document.getElementById( 'sw1' ).innerHTML += xhr.responseText;
}else{
document.getElementById( 'oaps_loading' ).innerHTML = 'loading';
}
};
xhr.open("POST", "script.php?u="+u+"&lim="+lim, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(null);
}
....
!