Jump to content

Archived

This topic is now archived and is closed to further replies.

justin15

Make a Date and time script

Recommended Posts

I am trying to make a date and time script that will 'refresh' every second, I would like for the just the script to reload, and not the entire page, because if you have a big page, it will take long to keep reloading the page every second.

So, has of now, I have a working script which reloads the page, and does it guick, because its jus tthe plain page. If anyone knows the answer to this SIMPLE guestion, please let me know.

Heres the page itself
[a href=\"http://24.215.127.102/PHP/date.php\" target=\"_blank\"]Click here for the page[/a]

Heres the code
[code]
<META HTTP-EQUIV="Refresh"
CONTENT="1; URL=date.php">

<?PHP
$today = date("F j, Y, g:i:s A");

echo "<B>Time and Date: $today</B>";


?>
[/code]

Share this post


Link to post
Share on other sites
no no you need AJAX to do that kind of small update to the page. I suppose it would be like to take the time with php and then in java add 1 second every second an update the area with the date inside it, or else get the time from java itself and not use php at all.

Share this post


Link to post
Share on other sites
[!--quoteo(post=382519:date=Jun 11 2006, 11:02 AM:name=joquius)--][div class=\'quotetop\']QUOTE(joquius @ Jun 11 2006, 11:02 AM) [snapback]382519[/snapback][/div][div class=\'quotemain\'][!--quotec--]
... not use php at all.
[/quote]
Right. That's exactly what javascript 'clocks' are meant to do.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.