If you load the particular div at page load using ajax we need to write the below script:
function showPage(){
if(http.readyState==4){
if(http.status==200){
isWorking=false;
var content = http.responseText;
content = content.split(‘id=”divid”‘)[1];
content = content.substring(content.indexOf(‘>’)+1);
var depth=1;
var output=”;
while(depth>0){
temp = content.split(‘
}else{
alert(http.status);
}
}
}