RealDrift Posted December 2, 2007 Share Posted December 2, 2007 Hi, I basically have two frames on my page, the top one contains users stats and the bottom frame contains the website. I want to have a message icon on the top frame which would flash once the user gets a new message. Obviously I would have one message icon which doesn't flash and another which does. Right now i refresh the top frame every 30 seconds so that the stats update. But is there an easier way to refresh? I mean right now the whole top frame refreshes which can get annoying. Is there any PHP code which would automatically update a stat once there is a change in it? Please let me know. Thanks Quote Link to comment Share on other sites More sharing options...
marcus Posted December 2, 2007 Share Posted December 2, 2007 AJAX is your answer. Basically run a request, and if the content of the file equals this, you have a new message, omg. Quote Link to comment Share on other sites More sharing options...
RealDrift Posted December 2, 2007 Author Share Posted December 2, 2007 what is AJAX? and what do u mean? sorry if i sound dum Quote Link to comment Share on other sites More sharing options...
marcus Posted December 2, 2007 Share Posted December 2, 2007 AJAX is a client-side language, it's basically javascript with php, haha. Quote Link to comment Share on other sites More sharing options...
RealDrift Posted December 2, 2007 Author Share Posted December 2, 2007 any pointers to a refresh code for that? and whats so funny? lol Quote Link to comment Share on other sites More sharing options...
marcus Posted December 2, 2007 Share Posted December 2, 2007 Google would be my best option. It just is. Quote Link to comment Share on other sites More sharing options...
RealDrift Posted December 2, 2007 Author Share Posted December 2, 2007 ok, thanks Quote Link to comment Share on other sites More sharing options...
RealDrift Posted December 2, 2007 Author Share Posted December 2, 2007 i cant get my head around this AJAX stuff. Could anyone help me code a refresh code? Quote Link to comment Share on other sites More sharing options...
mr_mind Posted December 2, 2007 Share Posted December 2, 2007 Try this page: http://ajaxpatterns.org/Periodic_Refresh 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.