Welcome to AlertInfo sign in with
Post a Free Classified
  • Contactus
  • Recipes
  • Lamp
  • Classifides
  • Home
alertinfo provides free classifiedss Post Your Add.
We are providing lot of information about lamplamp.
From here you will get the more recipies recipies.
Alertinfo Gallery
Page Load only load the particular div using Ajax

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(‘

’)[0];
//count occurrences
i=0;
pos = temp.indexOf(“
while(pos!=-1){
i++;
pos = temp.indexOf(“
}
//end count
depth=depth+i-1;
output=output+content.split(‘
’)[0]+’
’;
content = content.substring(content.indexOf(‘
’)+6);
}
document.getElementById(‘divid’).innerHTML=output;

}else{
alert(http.status);
}
}
}

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Login with Facebook:
Log In
Recent Articles
Alertinfo Favorites