www.webdeveloper.com
Results 1 to 3 of 3

Thread: HTML file

  1. #1
    Join Date
    Feb 2004
    Posts
    11

    HTML file

    What am i doing wrong with this source sode. it will not work.


    <HTML>
    <HEAD>
    <TITLE> <Civil War Quiz #1>
    <input type="submit" onclick="CheckAns();" value="Submit">
    </HEAD>
    </SCRIPT>

    <!—Begin
    var ans = new Array;
    var done = new Array;
    var score = 0;
    ans[1] = “b”;
    ans[2] = “a”;
    ans[3] = “c”;
    ans[4] = “b”;
    ans[5] = “d”;
    ans[6] = “d”;
    ans[7] = “a”;
    ans[8] = “c”;
    ans[9] = “b”;
    ans[10] = “a”;
    function Engine (question, answer) {
    if (answer != ans[question] ) {
    if (!done[question] ) {
    done[question] = -1;
    alert(“Wrong!\n\nYour score is now: “ + score);
    }
    else {
    alert(“You have already answer that!”);
    }
    }
    else {
    if (!done[question] ) {
    done[question] = -1;
    score++;
    alert(“correct!\n\nYour score is now: “ + score);
    }
    else {
    alert(“you have already answered that!”);
    }
    }
    }
    //End -->
    <HTML>


    <HTML>
    <HEAD>
    <input type="submit" onclick="CheckAns();" value="Submit">
    <TITLE> <Civil War Quiz #1>
    </HEAD>
    </SCRIPT>

    <BODY>

    <FORM>
    <b>1. Stonewall Jackson died in which battle? </b> <p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Petersburg<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Chancellorsville<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Fredericksburg<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Wilderness</P>

    <b>2. Chancellorville pitted. </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Lee vs. Hooker<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Lee vs. Grant<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Lee vs. McClellan<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Lee vs. Mead</p>

    <b>3. Which Confederate general died at Shiloh? </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Stonewall Jackson<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Joseph E. Johnson<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Albert Sidney Johnston<br.
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Jeb Stuart</p>

    <b>4. The “high water mark of the confederacy” occurred at: </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Antietam<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Gettysburg<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Chanceellorsville<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Appomatox<pr>

    <b>5. The battle of Seven Days pitted: </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Lee vs. Grant<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Lee vs. Hooker<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Johnson vs. Sherman<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Lee vs. McClellan</p>

    <b>6. This battle involved trench warfare and foreshadowed WWI </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Gettysburg<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Atlanta<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>The Wilderness<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Petersburg</p>

    <b>7. The bloodiest day of the war occurred at:</b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Antietam<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Gettysburg<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Shiloh<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Cold Harbor</p>


    <b>8. Shiloh pitted:</b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Lee vs. Hooker<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Lee vs. Grant<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Johnson vs. Grant<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Johnson vs. Sherman</p>

    <b>9. Lost Confederate battle plans were an important precursor to: </b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Gettysburg<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Antietam<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”>Appomatox<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Seven days</p>

    <b>10. Which of these battles did not involve U.S. Grant?</b><p>
    <input type = radio value = “a” onClick = “Engine(1, this value)”>Gettysburg<br>
    <input type = radio value = “b” onClick = “Engine(1, this value)”>Shiloh<br>
    <input type = radio value = “c” onClick = “Engine(1, this value)”> Petersburg<br>
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Vicksburg</p>


    </CENTER>
    <INPUT TYPE = “submit” VALUE = “Submit” NAME = “submit1”>
    <INPUT TYPE = “reset” VALUE = “Reset” NAME = “reset1”>
    </CENTER>
    </FORM>
    </HTML>

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,222
    Code:
    <TITLE> <Civil War Quiz #1>
    <input type="submit" onclick="CheckAns();" value="Submit">
    </HEAD>
    </SCRIPT>
    no end tage for the title, but an end tag for a script and input type in the head.
    Code:
    <!—Begin
    var ans = new Array;
    var done = new Array;
    no start tag for your java script
    ( should be <script language="javascript" type="text/javascript"> )
    [code]
    <HTML>


    <HTML>
    [/head]
    to start <html> tags in the middle of the head
    Code:
    <input type="submit" onclick="CheckAns();" value="Submit">
    <TITLE> <Civil War Quiz #1>
    </HEAD>
    another title (cant have 2) and no end to it, and another input in the head.
    Code:
    </CENTER>
    two end center tags with no beginning.

  3. #3
    you might fix these tags too:

    <input type = radio value = “c” onClick = “Engine(1, this value)”>Albert Sidney Johnston<br.
    <input type = radio value = “d” onClick = “Engine(1, this value)”>Appomatox<pr>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles