Jump to content

Ajax Page Refresh


Chocolate570

Recommended Posts

Hi guys,I need someone to help me with this.What I'm aiming for is a function I can call, like pgref(), and ajax will re-request the server for the page data (all of it) and then replace the page with that data, but without the user having to refresh.Is it possible?Thanks!Choco

Link to comment
Share on other sites

You bet ya!

<?phpif($_POST['action'] == "get_page"){echo "Page content.. blah blah blah!!";}else{?><script type="text/css">window.setInterval('ajax_refresh()', '1000'); // refreshes every secondfunction ajax_reresh(){ajax code}</script><?php}?>

ill post full code later

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...