javascript - php refresh just a part of the page -


helllo builded countdown php

then noticed have refresh keep displaying correctly.

so im using: header( "refresh:1;url=time.php" ); inside php ,but refresh page!

is there away put in div , refresh part of page..?here how im displaying :

echo "result: {$days}d {$hours}h {$minutes}m {$seconds}s<br/>\n";  echo "received: 7d 0h 0m 0s<br/>\n";  header( "refresh:1;url=time.php" ); 

try

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script> <script type="text/javascript">     var auto_refresh = setinterval(     function ()     {     $('#status').load('record.php');     }, 1000); // refresh every 1000 milliseconds </script> <body> <div id="status"></div> </body> 

make new php file record.php , put countdown code in it, refresh div every second


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -