Help with this code.

admin

Administrator
Staff member
Cannot get it to work. and how can I send it to some over the e-mail, and have them run it on their computer.<br />
<br />
<HTML><br />
<HEAD><br />
<TITLE><Civil War Quiz #1></TITLE><br />
<input type="submit" onclick="CheckAns();"value="Submit"><br />
</HEAD><br />
</SCRIPT><br />
<br />
<script language="javascript" type="text/javascript"><br />
<!-Begin<br />
var ans = new Array;<br />
var done = new Array;<br />
var score = 0;<br />
ans[1] = "b";<br />
ans[2] = "a";<br />
ans[3] = "c";<br />
ans[4] = "b";<br />
ans[5] = "d";<br />
ans[6] = "d";<br />
ans[7] = "a";<br />
ans[8] = "c";<br />
ans[9] = "b";<br />
ans[10] = "a";<br />
function Engine (question, answer) {<br />
if (answer != ans[question] ) {<br />
if (!done[question] ) { <br />
done[question] = -1;<br />
alert("Wrong!\n\nYour score is now: " + score);<br />
}<br />
else {<br />
alert("You have already answer that!");<br />
}<br />
}<br />
else {<br />
if (!done[question] ) {<br />
done[question] = -1;<br />
score++;<br />
alert("correct!\n\nYour score is now: " + score);<br />
}<br />
else {<br />
alert("you have already answered that!");<br />
}<br />
}<br />
}<br />
//End --> <br />
<br />
<HTML><br />
<br />
<br />
<br />
<HTML><br />
[/HEAD]<br />
<input type="submit" onclick="CheckAns();"value="Submit"><br />
<TITLE> <Civil War Quiz #1><br />
</HEAD><br />
<br />
<br />
<BODY><br />
<br />
<FORM><br />
<b>1. Stonewall Jackson died in which battle? </b> <p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Petersburg<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Chancellorsville<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Fredericksburg<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Wilderness</P><br />
<br />
<b>2. Chancellorville pitted. </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Lee vs. Hooker<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Lee vs. Grant<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Lee vs. McClellan<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Lee vs. Mead</p><br />
<br />
<b>3. Which Confederate general died at Shiloh? </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Stonewall Jackson<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Joseph E. Johnson<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Albert Sidney Johnston<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Jeb Stuart</p><br />
<br />
<b>4. The "high water mark of the confederacy" occurred at: </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Antietam<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Gettysburg<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Chanceellorsville<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Appomatox</p><br />
<br />
<b>5. The battle of Seven Days pitted: </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Lee vs. Grant<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Lee vs. Hooker<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Johnson vs. Sherman<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Lee vs. McClellan</p><br />
<br />
<b>6. This battle involved trench warfare and foreshadowed WWI </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Gettysburg<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Atlanta<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">The Wilderness<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Petersburg</p><br />
<br />
<b>7. The bloodiest day of the war occurred at:</b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Antietam<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Gettysburg<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Shiloh<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Cold Harbor</p><br />
<br />
<br />
<b>8. Shiloh pitted:</b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Lee vs. Hooker<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Lee vs. Grant<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Johnson vs. Grant<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Johnson vs. Sherman</p><br />
<br />
<b>9. Lost Confederate battle plans were an important precursor to: </b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Gettysburg<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Antietam<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)">Appomatox<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Seven days</p><br />
<br />
<b>10. Which of these battles did not involve U.S. Grant?</b><p><br />
<input type = radio value = "a" onClick = "Engine(1, this value)">Gettysburg<br><br />
<input type = radio value = "b" onClick = "Engine(1, this value)">Shiloh<br><br />
<input type = radio value = "c" onClick = "Engine(1, this value)"> Petersburg<br><br />
<input type = radio value = "d" onClick = "Engine(1, this value)">Vicksburg</p><br />
<br />
<br />
<CENTER><br />
<INPUT TYPE = "submit" VALUE = "Submit" NAME = "submit1"><br />
<INPUT TYPE = "reset" VALUE = "Reset" NAME = "reset1"><br />
</CENTER><br />
</FORM><br />
</HTML><!--content-->http://forums.webdeveloper.com/showthread.php?s=&threadid=28916<!--content-->wouldn't they just view the source to see all the answers?<!--content-->and no double posting as link indicates! its rude!<!--content-->And another posting-mishap is you posted a lot of code, most of it irrelevant! wtf?<!--content-->isn't that under the sticky for what not to post as a title and content?<!--content-->i think it is, actually. and by the way sidenote: nice avatar, incawarrior<!--content-->
 
Back
Top