11Tami Posted November 16, 2006 Share Posted November 16, 2006 Hi I am having something change on the minute using the following php minute command. $getfile = date("i");Thing is it only changes on page load not automatically. How to make it change automatically? Please let me know, thank you very much. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 16, 2006 Share Posted November 16, 2006 that would be a cron job or using javascript as well wouldnt it. Quote Link to comment Share on other sites More sharing options...
btherl Posted November 16, 2006 Share Posted November 16, 2006 You can change things without loading the page using javascript. If you need to fetch data from php without reloading the page, you can look into AJAX (it's a big topic) Quote Link to comment Share on other sites More sharing options...
11Tami Posted November 16, 2006 Author Share Posted November 16, 2006 Anybody know how to do this with javascript? I know how to make my page refresh using javascript but would only like the script itelf to change not the whole page so its less intrusive. Can I use javascript along with php in the php script? Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted November 17, 2006 Share Posted November 17, 2006 i am pretty sure it is possible with the help of AJAX. because all you would want is a timer that counts down, when it reaches zero run a piece of php code then reset the counter and loop through it again. Quote Link to comment Share on other sites More sharing options...
nick89 Posted November 17, 2006 Share Posted November 17, 2006 You can either do a real-time sync with ajax, or you could write a javascript script to automatically increment from the starting datetime. Quote Link to comment Share on other sites More sharing options...
11Tami Posted November 17, 2006 Author Share Posted November 17, 2006 nick89 you still there? What do you mean by start with the datetime with javascript? Quote Link to comment 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.