Jump to content

Countdown than run script


Lukela

Recommended Posts

Here's my situation, Im building a Browser-based game. In this games you have these troops that you are able to attack people's villages and such, when you attack someone you need to take the time difference between them two and that will be how long it takes to reach the target. I can use PHP to calculate the time, but I need a JS script that once the time hits 00:00:00 it would run the attack script to calculate the battle. Anyone here can help?

Link to comment
https://forums.phpfreaks.com/topic/85675-countdown-than-run-script/
Share on other sites

not directly no. a jS script will only continue to run whilst the page the script is embedded in is loaded in the browser window. this does not mean that the script would die if you were to utilize an <iframe> to display another page within the current page.

 

Hope to have helped.

 

Jos.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.