justin15 Posted June 11, 2006 Share Posted June 11, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/11714-make-a-date-and-time-script/ Share on other sites More sharing options...
joquius Posted June 11, 2006 Share Posted June 11, 2006 ajax? Quote Link to comment https://forums.phpfreaks.com/topic/11714-make-a-date-and-time-script/#findComment-44285 Share on other sites More sharing options...
justin15 Posted June 11, 2006 Author Share Posted June 11, 2006 What the hell ... lol ... I dont see that having anything to do with my script Quote Link to comment https://forums.phpfreaks.com/topic/11714-make-a-date-and-time-script/#findComment-44286 Share on other sites More sharing options...
joquius Posted June 11, 2006 Share Posted June 11, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/11714-make-a-date-and-time-script/#findComment-44288 Share on other sites More sharing options...
AndyB Posted June 11, 2006 Share Posted June 11, 2006 [!--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. Quote Link to comment https://forums.phpfreaks.com/topic/11714-make-a-date-and-time-script/#findComment-44296 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.