Jump to content

Ajax Refresh Change


RealDrift

Recommended Posts

Hi,

 

i have been googling the xmlhttprequest function and i found this tutorial: http://www.openhosting.co.uk/articles/webdev/5899/

 

at the end of that tutorial it shows how i can click a link and display new info. Is there any way I dnt have to click a link and still be able to pull info from a php file and not a .txt one?

 

please could somebody help me with this.

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/138398-ajax-refresh-change/
Share on other sites

All you should have to do is place the newcontent.txt with yourscript.php. Like this

 

function getNewContent(){
    http.open('get','yourscript.php');
    http.onreadystatechange = updateNewContent;
    http.send(null);
    return false;
}

Link to comment
https://forums.phpfreaks.com/topic/138398-ajax-refresh-change/#findComment-723619
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.