Jump to content


Photo

code needed for clock countdown script


  • Please log in to reply
4 replies to this topic

#1 Space Cowboy

Space Cowboy
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 14 June 2006 - 11:24 AM

OK, im trying to get working a countdown clock for a kind of game im doing.



Basically I need the clock to have only minutes and seconds, and it counts down from say 10 minutes from whenever the user enters the site.



I understand this may need to be java script as I want people to actually see the minutes and seconds tick away.

When the time is up, I need the page to be re-directed to a new page which will state that their time is up- game over etc



As this game spans over 48 web pages, the clock obviously needs to carry forward its time (minutes remaining) over to each page.

Ideally I would like the 'clock/timer' to float at the top of each screen (perhaps with CSS?).



Can anyone help with this?



#2 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 14 June 2006 - 11:30 AM

Yes, this is a javascript question and there is an entire forum dedicated to javascript questions.

#3 Space Cowboy

Space Cowboy
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 14 June 2006 - 11:56 AM

but this will obviouly still use php to do the things I asked?

#4 trq

trq
  • Staff Alumni
  • Advanced Member
  • 31,041 posts

Posted 14 June 2006 - 12:02 PM

I cant see where any of that would use php.

#5 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 14 June 2006 - 03:59 PM

Yes you can javascript for all of what you want to do. But to keep the clock counting down you'll probably want to have a frameset so one frame has the counter and the other has the game.

Or just have the game in an iframe.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users