3 Replies - 685 Views - Last Post: 06 October 2010 - 09:29 PM

#1 scott142  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 03-September 10

need help with second countdown

Posted 05 October 2010 - 02:15 AM

I'm currently making a mafia game in php and im creating a crimes page, however i'm stuck on the crimes page because I can't figure out how to implement a seconds countdown. what im trying to do is when a crime is commited the countdown will start for a certain amount of seconds then when the countdown finishes you will be able to commit the crime again.

so I hope some could show me how to do this, it would be a big help.

Thanks

This is my crimes page so far hope you can help.

<?php
require ("left.php");

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="en-gb" http-equiv="Content-Language"/>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style type="text/css">
.align_center {
	text-align: center;
}
.align_left {
	text-align: left;
}

.table_border {
	border: 1px solid #FFFFFF;
	background-color: #666666;
}
</style>
</head>

<body style="color: #FFFFFF; background-color: #333333">
<div style="width: 1288px" class="contain">
<br />
<form action="" method="post">
<table align="center" style="width: 27%; height: 122" class="table_border">
	<tr>
		<td style="width: 32px"><input name="crime_5" type="checkbox"/></td>
		<td style="width: 231px" class="align_left">Hijack a plane.</td>
		<td class="align"> </td>
	</tr>
	<tr>
		<td style="width: 32px"><input name="crime_4" type="checkbox"/></td>
		<td style="width: 231px" class="align_left">Kidnap somebody for a randsom.</td>
		<td class="align"> </td>
	</tr>
	<tr>
		<td style="width: 32px"><input name="crime_3" type="checkbox"/></td>
		<td style="width: 231px" class="align_left">Rob a shop.</td>
		<td class="align"> </td>
	</tr>
	<tr>
		<td style="width: 32px"><input name="crime_2" type="checkbox"/></td>
		<td style="width: 231px" class="align_left">Sell stolen goods.</td>
		<td class="align"> </td>
	</tr>
	<tr>
		<td style="width: 32px"><input name="crime_1" type="checkbox"/></td>
		<td style="width: 231px" class="align_left">Rob someone of the street.</td>
		<td class="align"> </td>
	</tr>
	<tr>
		<td class="align" colspan="3">
		<input name="commit" type="submit" value="Commit"/></td>
	</tr>
	</table>
</form>
<br />
</div>
</body>

</html>
<?php
require ("right.php");


?>



Is This A Good Question/Topic? 0
  • +

Replies To: need help with second countdown

#2 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 96
  • View blog
  • Posts: 1,176
  • Joined: 22-October 08

Re: need help with second countdown

Posted 05 October 2010 - 03:12 AM

Well this is more of a javascript question or maybe cronjobs
Was This Post Helpful? 0
  • +
  • -

#3 scott142  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 15
  • Joined: 03-September 10

Re: need help with second countdown

Posted 05 October 2010 - 04:46 AM

View Postaaron1178, on 05 October 2010 - 02:12 AM, said:

Well this is more of a javascript question or maybe cronjobs


can someone show me how to do this please?
Was This Post Helpful? 0
  • +
  • -

#4 aaron1178  Icon User is offline

  • Dovakiin, Dragonborn
  • member icon

Reputation: 96
  • View blog
  • Posts: 1,176
  • Joined: 22-October 08

Re: need help with second countdown

Posted 06 October 2010 - 09:29 PM

You can critisize me all you like, you need to show some effort, read the forum rules, you might get somewhere asking questions but help me. I dont know much about javascript so i cannot help you. I had done this before but all i can remember was on the html body tag you had to put onload with a setTimeout function there.

Quote

From Yoda:Friend is google, the dark side is not

Thanks Aaron1178
Was This Post Helpful? 2
  • +
  • -

Page 1 of 1