- Impact
- 4
I'm having a problem. I'm trying to make a game site, but I have been having an issue.
To view the problem, go to www.zombiegate.com and login under:
user: namepros
pass: guest
and click on the game button. To switch games click on find and then switch to another game if you need to. Variables are reset at midnight central time.
I have some game variables that are being displayed on the page. The expected results is: user presses a button, the page refreshes, and the new values are displayed. However, it would seem that the page does not actually refresh until the second button press, and it works from then on. The first press seems to refresh the page, but the new values are not shown.
Maybe there is a way other than ajax where I could show the new values without generating the page again?
I have fixed this on at least one other page by changing the order of the code. This must be avoided, though, since I may want the page to look a certain way, and I don't want to be hampered by something like this. Also
I already tried it on this particular page, and it didn't fix it.
If you help me solve this, you will most definitely get a free premium account or whatever if the site gets up and running one day. Maybe 20 NP$?
The survivor button should do stuff (add one to survivor and subtract one from turns), but the weapons button intentionally does nothing because it seems to refresh the page correctly the first press.
Not sure if the barricade button does anything (it's been a few days).
NOTE: the site is on drupal, and all caching is disabled right now. I would do ASP but I'm not sure if drupal natively supports it (as far as being displayed correctly in the block) yet.
Also, I'm just screwing around with learning php right now. The games direction or style is completely undetermined. That's why it looks like it would suck.
THANK YOU ANYONE THAT HELPS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

EXTRA INFO: I have already tried forcing the page to refresh after the $_POST of the button. The page simply refreshed again without showing the updated values. Doing it twice had the same result - just look longer!
To view the problem, go to www.zombiegate.com and login under:
user: namepros
pass: guest
and click on the game button. To switch games click on find and then switch to another game if you need to. Variables are reset at midnight central time.
I have some game variables that are being displayed on the page. The expected results is: user presses a button, the page refreshes, and the new values are displayed. However, it would seem that the page does not actually refresh until the second button press, and it works from then on. The first press seems to refresh the page, but the new values are not shown.
Maybe there is a way other than ajax where I could show the new values without generating the page again?
I have fixed this on at least one other page by changing the order of the code. This must be avoided, though, since I may want the page to look a certain way, and I don't want to be hampered by something like this. Also
I already tried it on this particular page, and it didn't fix it.
If you help me solve this, you will most definitely get a free premium account or whatever if the site gets up and running one day. Maybe 20 NP$?
The survivor button should do stuff (add one to survivor and subtract one from turns), but the weapons button intentionally does nothing because it seems to refresh the page correctly the first press.
Not sure if the barricade button does anything (it's been a few days).
NOTE: the site is on drupal, and all caching is disabled right now. I would do ASP but I'm not sure if drupal natively supports it (as far as being displayed correctly in the block) yet.
Also, I'm just screwing around with learning php right now. The games direction or style is completely undetermined. That's why it looks like it would suck.
THANK YOU ANYONE THAT HELPS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
EXTRA INFO: I have already tried forcing the page to refresh after the $_POST of the button. The page simply refreshed again without showing the updated values. Doing it twice had the same result - just look longer!







