Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Please help - Javascript <?>

    Can anyone please help me…I create these questions for my school project. I would like it works like:
    • provide immediate feedback to the user as they make a correct or incorrect choice or submit their answers
    • reveal the second question only after the first question was answered correctly

    How can we use the client script to make it works. Attached is my html page. Thanks for a whole bunch. I know, many experts in this forum can give the best answer.


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>

    <body>
    <table>
    <tr>
    <td>
    <u>Question 1: True/False </u>
    <br>
    The feedback should be provided in a new web browser window.<br>
    <em>Question statement </em> <br>
    One of the city of CA is Sealte. <br>
    <em>Feedback statements</em> <br>
    <input type="radio">True response : "False, try again." <br>
    <input type="radio">False response: "Correct" <br>

    </td>
    </tr>
    <tr>
    <td>
    <u>Question 2: Multiple-choice with multiple answers </u><br>
    The feedback should be written to a text field within the same window.<br>
    <em>Question statement</em><br>
    The primary colors are (choose all that apply):<br>
    <input name="red" type="checkbox" value="">Red<br>
    <input name="yello" type="checkbox" value="">Yellow<br>
    <input name="green" type="checkbox" value="">Green<br>
    <input name="orange" type="checkbox" value="">Orange<br>
    <input name="purple" type="checkbox" value="">Purple<br>
    <input name="blue" type="checkbox" value="">Blue<br>
    <em>Feedback statements</em><br>
    Correct answers are red, yellow and blue.<br>
    For each correct option selected there should be a sentence in the feedback message like "_____ is a primary color."<br>
    If an incorrect color is selected, the feedback should be "______ is not a primary color, try again."<br>

    </td>

    </tr>
    </table>
    </body>
    </html>

  • #2
    WA
    WA is offline
    Administrator
    Join Date
    Mar 2002
    Posts
    2,596
    Thanks
    2
    Thanked 19 Times in 18 Posts
    Please note that we can't do all the work for you, especially with homework assignments where it would be considered cheating. If you have a script already but just can't get certain parts of it worked out, feel free to post that, and explain the portion you're having trouble with.
    - George
    - JavaScript Kit- JavaScript tutorials and 400+ scripts!
    - JavaScript Reference- JavaScript reference you can relate to.

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Posts
    184
    Thanks
    0
    Thanked 0 Times in 0 Posts
    THanks for your reply. THis is not a homework. this is a free project that I want to do. And I want to learn from expert people ...how to do that..

    Does anyone know anywhere to get some similar souce codes???
    Last edited by ClueLess; 07-11-2004 at 04:50 AM.


  •  

    Posting Permissions

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