469,337 Members | 5,988 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,337 developers. It's quick & easy.

refreshing a page or reloading a page within a div layer

anfetienne
424 256MB
Hi,

(to start im a newbie with ajax) I have this script that reloads a page into a div layer after a certain amount of time using jquery

Expand|Select|Wrap|Line Numbers
  1. <script>
  2.  $(document).ready(function() {
  3.       $("#latestNewsHolder").load("latest.php");
  4.    var refreshId = setInterval(function() {
  5.       $("#latestNewsHolder").load('latest.php');
  6.    }, 36000);
  7. });
  8. </script>
  9.  
the script works great but my problem is id just like it to refresh the whole page without blinking as there is more than one part of the page that needs updating and it also messes with the resulting page of form submissions that are with the areas loaded... is there not a way to change the ".load(''latest.php);" into something that refreshes a whole page instead of partial?
Apr 30 '10 #1
1 2929
acoder
16,027 Expert Mod 8TB
If you want to refresh/reload the whole page, use location.reload.
Apr 30 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

4 posts views Thread by Bill | last post: by
3 posts views Thread by micchy | last post: by
6 posts views Thread by iwearwatches | last post: by
8 posts views Thread by -Karl | last post: by
22 posts views Thread by PSN | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.