Chocolate570 Posted September 21, 2006 Share Posted September 21, 2006 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 More sharing options...
reportingsjr Posted September 21, 2006 Share Posted September 21, 2006 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 More sharing options...
Webworldx Posted September 21, 2006 Share Posted September 21, 2006 Apologies for the content on there (i'm playing about with someone's site layout) - but have a look at:http://www.ifcode.com/projects/project/sc-photos_new/Is that the sort of thing you want? Link to comment Share on other sites More sharing options...
Chocolate570 Posted September 21, 2006 Author Share Posted September 21, 2006 Pretty much, James. I just wanted the page to refresh it's content. Could I get the code for that? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now