MikeT Posted July 22, 2008 Share Posted July 22, 2008 Hello... I am having a problem in PHP. My layout has it so that banner is loaded, then left nav and then the content (center). I know that HTML reads it in order while loading, and that is my problem. On the left bar I have some game stats, and in the middle content area I have a TEST update one of the stats... So when the index.php is loaded it loads the stats to the left first and then the content (where the update happens)... So basically I have to refresh to show that the stats have changed... I am wondering if there is anyway around this problem as it's bugging the hell out of me! Thanks for any/all replied Link to comment https://forums.phpfreaks.com/topic/116081-php-help/ Share on other sites More sharing options...
LemonInflux Posted July 22, 2008 Share Posted July 22, 2008 You want to show stat changes without reloading? http://www.google.co.uk/search?q=ajax&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596872 Share on other sites More sharing options...
MikeT Posted July 22, 2008 Author Share Posted July 22, 2008 Thanks for the reply, but I know it aint AJAX that does it. I have seen a game that does it without, s1.rsbattle.com (sorry if this counts as advertising, I just want you to know what I mean) If you sign up and have a quick one battle you will see that it updates the left stats right away... It's getting to me so bad as I know it can be done, just finding out the way... Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596876 Share on other sites More sharing options...
revraz Posted July 22, 2008 Share Posted July 22, 2008 I can't see the site you are referring to, but many sites use Javascript to do dynamic updates. But everything you are asking for is not done in PHP. Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596883 Share on other sites More sharing options...
MikeT Posted July 22, 2008 Author Share Posted July 22, 2008 Try s2.rsbattle.com and the code doesn't show and Javascript on it, so I assume he is using PHP to do something. Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596886 Share on other sites More sharing options...
MikeT Posted July 22, 2008 Author Share Posted July 22, 2008 Bump Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596902 Share on other sites More sharing options...
revraz Posted July 22, 2008 Share Posted July 22, 2008 No need to bump your thread after 10 mins. As stated before, PHP does not do anything dynamic. Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596905 Share on other sites More sharing options...
LemonInflux Posted July 22, 2008 Share Posted July 22, 2008 First thing I noticed in the code was: PHP isn't dynamic. If it automatically refreshes, and it isn't static text, it's AJAX. ---------------- Now playing: Enter Shikari - Acid Nation via FoxyTunes Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596908 Share on other sites More sharing options...
MikeT Posted July 22, 2008 Author Share Posted July 22, 2008 IF you actually go to that site, register and have one quick battle you will see that AJAX isn't used on the left or the center bars. It is static, yet it still updates when you have battled. E.g: You click battle with 10hp to the left, it goes to a new page where the battle is auto done (no refreshing or anything) and then it tells you how much you hit the opponent, how much HP you lost, etc. Yet to the left (still without refreshing) it shows your NEW hp and stats. I have looked through the source code and it doesn't use AJAX. Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596913 Share on other sites More sharing options...
trq Posted July 22, 2008 Share Posted July 22, 2008 I have looked through the source code and it doesn't use AJAX. Well it definately doesn't use php. PHP runs on the server and cannot update a browser (and no I didn't sign up or battle). It definately sounds like client side trickery. Link to comment https://forums.phpfreaks.com/topic/116081-php-help/#findComment-596965 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.