codingmasterRS Posted June 12, 2011 Share Posted June 12, 2011 Hi guys, I am after some code like Twitter (and FB) that updates page content from a PHP function. I believe in need AJAX or jQuery/AJAX, so if anyone cna point me in the right direction in terms of code that would be great. Cheers PS. It needs to be done at a set interval Quote Link to comment Share on other sites More sharing options...
fugix Posted June 12, 2011 Share Posted June 12, 2011 if you are not familiar with either, you can visit http://jquery.com/ and https://developer.mozilla.org/en/AJAX Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 thanks for the links, but they are not all together that helpful, someone must have done this and have the code or know how to do it. Quote Link to comment Share on other sites More sharing options...
fugix Posted June 12, 2011 Share Posted June 12, 2011 Its fairly simple to do. However you must first know the language that it uses. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 I have found this http://roshanbh.com.np/2008/03/call-php-ajax-every-second-jquery.html but it calls a page not a function, I need to get it to call a function Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 Its fairly simple to do. However you must first know the language that it uses. how do you mean? Quote Link to comment Share on other sites More sharing options...
Alex Posted June 12, 2011 Share Posted June 12, 2011 I have found this http://roshanbh.com.np/2008/03/call-php-ajax-every-second-jquery.html but it calls a page not a function, I need to get it to call a function You obviously don't know how this technology works. I suggest you read into it before you attempt to use it. The mozilla link fugix posted is a good place to start. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 The Mozilla link is not relevant to my code. Somedays I wish people would just answer the question Quote Link to comment Share on other sites More sharing options...
Alex Posted June 12, 2011 Share Posted June 12, 2011 You're planning on using AJAX, and that link explains AJAX. How could it not be relevant? You're after a quick solution, and specifically one that doesn't even make sense given the nature of AJAX. There is no simple "copy & paste this magical code and everything will work". It depends on your situation. If you want to get the data from a PHP function, then have the PHP page call the function. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 The reason behind using AJAX is so that it updates on a very regular interval Quote Link to comment Share on other sites More sharing options...
Philip Posted June 12, 2011 Share Posted June 12, 2011 The Mozilla link is not relevant to my code. are you sure about that? Somedays I wish people would just answer the question We have a board for that, it's called Freelancing Quote Link to comment Share on other sites More sharing options...
Alex Posted June 12, 2011 Share Posted June 12, 2011 The reason behind using AJAX is so that it updates on a very regular interval Okay. Quote Link to comment Share on other sites More sharing options...
codingmasterRS Posted June 12, 2011 Author Share Posted June 12, 2011 The reason behind using AJAX is so that it updates on a very regular interval Okay. yup Quote Link to comment Share on other sites More sharing options...
fugix Posted June 12, 2011 Share Posted June 12, 2011 If you're serious about coding, learn to incorporate Ajax into your code using the link I provided, then once you try to accomplish what you are trying to do, we will be glad to help 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.