Hello Everybody
I am developing a small project on word game. My requirement is that I have to show time out say of 25 secs on JSP page.
Code which I am using is
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">
var timer = null
Function start(){
var time = new Date()
var hours = time.getHours()
var minutes = time.getMinutes()
minutes=((minutes < 10) ? "0" : "") + minutes
var seconds = time.getSeconds()
seconds=((seconds < 10) ? "0" : "") + seconds
var clock = hours + ":" + minutes + ":" + seconds
document.forms[0].display.value = clock
timer = setTimeout("start()",25000)
}
</script>
</head>
<body onload="startup()">
<form action="SecondServlet">
<table BORDER=0 CELLSPACING=23 CELLPADDING=0>
<tr>
<td><b> WORD <input type="text" name="word"> </input> </b></td>
</tr>
<tr>
<td vertical align=right><b> Ans <input type="text"
name="yourAns"> </b></td>
</tr>
<tr>
<td vertical align=center><b> SUBMIT <input type="submit"
name="submit" value="Submit"> </input></b></td>
</tr>
</table>
</form>
</body>
</html>
Help in any form will be appreciated.
Thanks.