Follow us on twitter

Vanilla 1.1.9 is a product of Lussumo. More Information: Documentation, Community Support.


  1.  

    I have to make a quiz and have it be timed
    I also have to have the quiz lock out every field except the submit button


    I know it is so easy but I can't find it in my book of a damn bible of javascript.

    Here is what I have so far:
    <html>


    <head>

    </head>


    <body>

    <h3>Who is our currrent President?</h3>
    <input type="radio" name="pres" id="barrack">Barack Obama
    <br>
    <input type="radio" name="pres" id="george">George Washington
    </body>
    </html>

    Image

    Please help me. I am going crazy. I have used the settimeout or whatever but nothing is working. I also managed to create a clock to countdown from 10 minutes but have not managed to have that clock run out and lock out every field except the submit button(again not yet put in my file shown). thanks in advance

  2.  
    Something like that would work along these lines

    THIS IS NOT THE CODE YOU NEED IT IS SIMPLY AN EXAMPLE OF SOMETHING YOU CAN BUILD ON AND USE HOW YOU NEED IT.


    Code:
    <script language="javascript">
    function timesUp()
    {
    //Put all your questions to be disabled here after the 10 mins
    document.getElementById("pres").disabled=true
    document.getElementById("nextID").disabled=true
    }
    setTimeout("timesUp()",600000)
    </script>
  3.  

    Set the timeout before the closure of the body tag, this will ensure all content has loaded first..

Add your comments