Page refresh with Ajax Advanced Loader

Hi, I want to use Ajax Advanced Loader to refresh a page on my website. But, the page contains already the following:

[php]
var reload = false;

  function countDown()
  {
    countDownTime--;
    if ( document.getElementById( "countDownText" ) )
    {
      document.getElementById( "countDownText" ).innerHTML = secsToMins( countDownTime );
    }
    if ( countDownTime == 0 )
    {
      clearInterval( countdown_timer );
      document.location.refresh();
      return;
    }
    else if ( countDownTime < 0 )
    {
      countDownTime = 10;
    }
  }
  function secsToMins( theValue )
  {
    if( theValue <= 0 )
    {
      return( "reloading..." );
    }
    var theMin = Math.floor( theValue / 60 );
    var theSec = ( theValue % 60 );
    if ( theSec < 10 )
    {
      theSec = "0" + theSec;
    }
    return( theMin + ":" + theSec );
  }
  var countDownTime = <?php _e( $secs_remain ); ?>;
  countdown_timer = setInterval ( "countDown();", 1000 );
</script>[/php]

After hours searching multiple sites I gave it up. How can I change the refresh method so that Ajax takes over?

Sponsor our Newsletter | Privacy Policy | Terms of Service