Ajax

script type="text/javascript">
    function update() {
        $("#refresh").load('refresh.php?' + 1*new Date());
    };
   
    function timestamp() {
        $.ajax({
            type: "GET",
            url: "update.php",
            success: function(data){
                $("#timestamp").fadeIn("slow").delay(2000).fadeOut("slow");  
            }
        });
    };
   
    $(document).ready(function() {
        $("#refresh").load("refresh.php");
        var refreshId = setInterval(function() {
            $.ajax({
                type: "GET",
                url: "timestamp.php",
                success: function(data){
                    if (data == 'true'){
                        update();
                    }          
                }
            });
        }, 10000);
    });
</script>
^