help!!!

wxdqz

New Member
why doesnt this work? when i first created it, it run but the second time the mark button stoped working. another question is, im making an online test and i dont want all the questons on one page so how do i pass the marks on to the next page or how do i create a button that mark other pages? hope you can help!

this is my code:


<html>
<head>
<title>Test</title>

<SCRIPT language ="JavaScript">
<!-- Hide
function dotime()
{
d = new Date()
document.Form1.time.value = d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds()
}
var dateform
speed=1000
len=24
tid = 0;

function dodate()
{
f.date.value=new Date();
tid=window.setTimeout("dodate()",speed);
}

function start(x) {
f=x
tid=window.setTimeout("dodate()",speed);
}

function cleartid() {
window.clearTimeout(tid);
}
function Clock()
{
document.write('<FORM name=dateform><input name=date size=')
document.write(len)
document.write(' value=http://www.webdeveloper.com/forum/archive/index.php/"Clock: Requires Javascript"></FORM>')
start(document.Form1);
}

// -->
</SCRIPT>


</head>

<body bgcolor="#FFFFCC" text="#000000">
<Script language ="JavaScript">
score=0
function mark(){
if (document.Form1.hci[1].checked == true ){
score=score+10
}
else {
score=score
}
if (document.Form1.senses[3].checked == true ){
score=score+10
}
else {
score=score
}
{alert("score:" + score)}
}
</script>

<Form name="Form1">
<table width="75%" border="0">
<tr>
<td width="15%">You started at </td>
<td width="11%">
<input type = text name = time value = <!-- m --><a class="postlink" href="http://www.webdeveloper.com/forum/archive/index.php/">http://www.webdeveloper.com/forum/archive/index.php/</a><!-- m -->"" size = 10>
<script>
dotime()
</script>
</td>
<td width="14%">and it is now</td>
<td width="60%"><script language="javascript">
Clock();
</script></td>
</tr>
</table>

<script language="JavaScript">
score=0
function checkButton(){
if (document.form1.hci[1].checked == true ){
score=score+10
}
else {
score=score
}
if (document.form1.senses[3].checked == true ){
score=score+10
}
else {
score=score
}

if (document.form1.retina[0].checked == true ){
score=score+10
}
else {
score=score
}
if (document.form1.sound[0].checked == true ){
score=score+10
}
else {
score=score
}
if (document.form1.smell[2].checked == true ){
score=score+10
}
else {
score=score
}
{alert("score:" + score)}
}

</script>


<p>
<p>Queston 1:<br>
What does HCI stand for? <br>
<INPUT TYPE = "Radio" NAME=hci >
Hypertext Compurer Interface <br>
<input type = "Radio" name=hci >
Human Computer Interface <br>
<input type = "Radio" name=hci >
Heuristic Computing Interface <br>
<input type = "Radio" name=hci >
Human Computer interchande</p>
<p><br>
Queston 2<br>
What are the five human senses?<br>
<input type="radio" name=mon>
What are the five human senses? <br>
<input type = Radio name=senses >
Vision, Hearing, Taste, Smell, Pain <br>
<input type = Radio name=senses >
Vision, Hearing, Teste, Sniffing, Touch <br>
<input type = Radio name=senses >
Vision, Hearing, Tongue, Smell, Touch <br>
<input type = Radio name=senses >
Vision, Hearing, Taste, Smell, Touch </p>
<p><br>
<p>Queston 3<br>
The retina consists of a series of (___________) <br>
<INPUT TYPE = Radio NAME=retina VALUE= retina1>
Nerve Cells <br>
<INPUT TYPE = Radio NAME=retina VALUE= retina2>
Iris <br>
<INPUT TYPE = Radio NAME=retina VALUE= retina3>
Optic nerve <br>
<INPUT TYPE = Radio NAME=retina VALUE= retina4>
Lens</p>
<p>
<p>Queston 4<br>
Sound waves very in what? <br>
<INPUT TYPE = Radio NAME=sound VALUE= sound1>
Amplitude, Wavelength and Frequency <br>
<INPUT TYPE = Radio NAME=sound VALUE= sound2>
Pitch, Hertz and Decibels <br>
<INPUT TYPE = Radio NAME=sound VALUE= sound3>
Loudness, Quiteness and distence <br>
<INPUT TYPE = Radio NAME=sound VALUE= sound4>
The person listening and the object that made the sound</p>
<p>Queston 5<br>
"Olfaction" is also known as what? <br>
<INPUT TYPE = Radio NAME=smell VALUE= smell1> Taste
<br><INPUT TYPE = Radio NAME=smell VALUE= smell2> Sound
<br><INPUT TYPE = Radio NAME=smell VALUE= smell3> Smell
<br><INPUT TYPE = Radio NAME=smell VALUE= smell4>
Hearing
<p></p>
<input type ="button" Value="Mark" onClick='checkButton()'>
</form>
</body>
</html>
 
Back
Top