HTML - Making My First Online Quiz
Hello!
I'm a real beginner when it comes to html, so sorry for my stupid questions. I've started making a logic quiz for my students using the following quiz code that I found online http://student.ccbcmd.edu/~abeiderm/.../quizCode.html http://student.ccbcmd.edu/~abeiderm/tims2005/quiz.html But I have encountered two problems. 1. When I write logical symbols that I want to appear in the textarea for the answer it doesn't print the symbol, only the code. How am I suppose to write the code to get the symbol? My code is now: //produce output in textarea. document.quiz.output.value += "The answer to question 1 is A ∨ ¬ A \n"; 2. I would like to be able to print peoples (in particular my students) answers to a file, so I can use the quiz as a test. Is this possible? Is there any sample of such a code, that I can just copy? thanks in advance! Similar TutorialsHello everyone. Below is the html code for a quiz i want to use for my website. What I want to do is, upon completion of the quiz, have 2 new text-entry forms and 1 "submit" button form appear at the bottom of the page asking the user to input one's name and email address before they can submit the results of their quiz. Both fields would be required.. <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Knowledge Assessment Tool</title> <script src="assessment.js" type="text/javascript"></script> <script src="quiz.js" type="text/javascript"></script> <link rel="stylesheet" href="quiz.css" type="text/css"> </head> <body bgcolor="#FFFFFF"> <p><font color="#2431A2"><u><b>10 Point Quiz</b></u></font></p> <div id="quiz1"></div> <div id="quiz2"></div> ** </body> </html> ** denotes where the text and submit button would show up after the quiz is completed asking the user for name/email address. As you can tell I have no clue how to acheive this. Any help is greatly appreciated. Thank you. Hey guys thanks to a hand full of sleepless nights, and some valuable guidance I received from some of you guys I finally have my first site-www.palmettogoldandsilver.com up and running smoothly... even on IE! So now I want to expand the site so I can list items on it for sale. I would like to list items with prices and have visitors be able to purchase the items online. Where do I go first? lol What do I need to do to get a shop up and functioning? Javascript? php? other? If someone could lay out some steps to take it would be great help thanks -Travis Hi, I'm working on a simple website in which I'm required to use two types of forms input on a webpage. I have decided to make a simple quiz which will be designed as follows; -------------------------------------------------------- Q1: The largest mammal on land is: (radio button choices) Q2: Please tick the two correct answers: (tick boxes, four available... only two correct) ---------------------------------------------------------- (BUTTON: Please click here for the answers) ... answers should appear once the above button is pressed... Answers: Q1: B Q2: A * C Is this possible in HTML? Sounds quite straight-forward but I'm no expert so forgive me.. Ps: Is it possible to design a radio button which, depending on the choice, the related-text will appear underneath on the same page? So if they select 'A' then paragraph 'A' will show, if they select 'C' then paragraph 'C' will appear (with the rest hiding)... Thanks! hi all im trying to make a quiz on this..here is my code but cant seem to get it to work Grrrrrrrrr ---------------------------------------------------------- it gives the user a mark on how he/she performed. This should be time limited and when finished should also display whether the given answers were wrong or correct. The user will get 2 marks for each correct answer, and -1 for each wrong answer. The quiz should consist of 10 questions. The background colour of the page should change according to the awarded mark. ---------------------------------------------------------- Code: <html><head> <title>Sports Quiz</title><script> //highlight color of answer - can change this color to a hex code or recognized color namevar highlightColor = "#00ff00"; //this should not be changedfunction checkQuestionDropDown(selectGroup) { if (selectGroup[selectGroup.selectedIndex].value == "correct") { return 1; } else { return 0; }} //this should not be changedfunction checkQuestionRadio(radioGroup) { //go through the radio group sent in and determine if radio button//checked is "correct". //return 1 for correct value, 0 for incorrect for (i=0; i<radioGroup.length; i++) { if (radioGroup[i].checked) { if (radioGroup[i].value == "correct") { return 1; } else { return 0; } } }return 0;} //this should not be changedfunction highlightCorrectButton(radioButton) { document.getElementById(radioButton).style.backgroundColor = highlightColor;} function checkQuiz() { //check each question to see if it's right. //The orange highlighted code may need to be changed //you will need to match these question types(Radio/DropDown) //and names (q1, q2, ...) to the ones in your quiz numCorrect = 0; numCorrect += checkQuestionRadio( document.quiz.q1); numCorrect += checkQuestionRadio( document.quiz.q2); numCorrect += checkQuestionRadio( document.quiz.q3); numCorrect += checkQuestionDropDown( document.quiz.q4); //highlight correct answers from radio button groups...use span id name highlightCorrectButton('correct1'); highlightCorrectButton('correct2'); highlightCorrectButton('correct3'); //produce output in textarea. document.quiz.output.value += "You got " + numCorrect + " out of 4 questions correct.\n" + "Your grade is " + Math.round(100*numCorrect/4) + "%\n" + "The answer to question 1 is HyperText Markup Language\n" + "The answer to question 2 is Jefferson City\n" + "The answer to question 3 is talking\n" + "The answer to question 4 is mass\n"; } setTimeout('submitForm()', 1*60*1000);function submitForm() { document.getElementById('form_id').submit();} </script></head><body> <form name="counter"><input type="text" size="8" name="d2"></form> <script> <!-- // var milisec=0 var seconds=30 document.counter.d2.value='60' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <form name="quiz"><ol><li><b>HTML stands for</b>:<br> <input type="radio" name="q1" value="wrong">How To Make Lines <br><input type="radio" name="q1" value="wrong">Hungry Men Talk Lots <span id="correct1"><br><input type="radio" name="q1" value="correct">HyperText Markup Language</span> <br><input type="radio" name="q1" value="wrong">Hyper Talk Machine Language</li><br><br><li><b>The capital of Missourri is</b>: <br><input type="radio" name="q2" value="wrong">St. Louis <span id="correct2"><br><input type="radio" name="q2" value="correct">Jefferson City</span> <br><input type="radio" name="q2" value="wrong">Missourri City <br><input type="radio" name="q2" value="wrong">Omaha</li><br><br><li><b> What is capital of wales:</b> <span id="correct3"><br><input type="radio" name="q3" value="correct">Cardiff</span> <br><input type="radio" name="q3" value="wrong">hankuva <br><input type="radio" name="q3" value="wrong">hong kong <br><input type="radio" name="q3" value="wrong">egypt</li><br></li><br><li><b> What is capital of spain:</b> <span id="correct3"><br><input type="radio" name="q3" value="correct">Ahuhu</span> <br><input type="radio" name="q3" value="wrong">Bchec <br><input type="radio" name="q3" value="wrong">Cdoddoe <br><input type="radio" name="q3" value="wrong">quebec</li><br></ol><br><br> <center><input type="button" onClick="checkQuiz()" value="check quiz"><hr><textarea cols="80" rows="10" name="output"></textarea></center></form></body></html><html> <head> <title>Sports Quiz</title> <script> //highlight color of answer - can change this color to a hex code or recognized color name var highlightColor = "#00ff00"; //this should not be changed function checkQuestionDropDown(selectGroup) { if (selectGroup[selectGroup.selectedIndex].value == "correct") { return 1; } else { return 0; } } //this should not be changed function checkQuestionRadio(radioGroup) { //go through the radio group sent in and determine if radio button //checked is "correct". //return 1 for correct value, 0 for incorrect for (i=0; i<radioGroup.length; i++) { if (radioGroup[i].checked) { if (radioGroup[i].value == "correct") { return 1; } else { return 0; } } } return 0; } //this should not be changed function highlightCorrectButton(radioButton) { document.getElementById(radioButton).style.backgroundColor = highlightColor; } function checkQuiz() { //check each question to see if it's right. //The orange highlighted code may need to be changed //you will need to match these question types(Radio/DropDown) //and names (q1, q2, ...) to the ones in your quiz numCorrect = 0; numCorrect += checkQuestionRadio( document.quiz.q1); numCorrect += checkQuestionRadio( document.quiz.q2); numCorrect += checkQuestionRadio( document.quiz.q3); numCorrect += checkQuestionDropDown( document.quiz.q4); //highlight correct answers from radio button groups...use span id name highlightCorrectButton('correct1'); highlightCorrectButton('correct2'); highlightCorrectButton('correct3'); //produce output in textarea. document.quiz.output.value += "You got " + numCorrect + " out of 4 questions correct.\n" + "Your grade is " + Math.round(100*numCorrect/4) + "%\n" + "The answer to question 1 is HyperText Markup Language\n" + "The answer to question 2 is Jefferson City\n" + "The answer to question 3 is talking\n" + "The answer to question 4 is mass\n"; } setTimeout('submitForm()', 1*60*1000); function submitForm() { document.getElementById('form_id').submit(); } </script> </head> <body> <form name="counter"><input type="text" size="8" name="d2"></form> <script> <!-- // var milisec=0 var seconds=30 document.counter.d2.value='60' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <form name="quiz"> <ol> <li><b>HTML stands for</b>:<br> <input type="radio" name="q1" value="wrong">How To Make Lines <br><input type="radio" name="q1" value="wrong">Hungry Men Talk Lots <span id="correct1"><br><input type="radio" name="q1" value="correct">HyperText Markup Language</span> <br><input type="radio" name="q1" value="wrong">Hyper Talk Machine Language </li><br><br> <li><b>The capital of Missourri is</b>: <br><input type="radio" name="q2" value="wrong">St. Louis <span id="correct2"><br><input type="radio" name="q2" value="correct">Jefferson City</span> <br><input type="radio" name="q2" value="wrong">Missourri City <br><input type="radio" name="q2" value="wrong">Omaha </li><br><br> <li><b> What is capital of wales:</b> <span id="correct3"><br><input type="radio" name="q3" value="correct">Cardiff</span> <br><input type="radio" name="q3" value="wrong">hankuva <br><input type="radio" name="q3" value="wrong">hong kong <br><input type="radio" name="q3" value="wrong">egypt </li><br> </li><br><li><b> What is capital of spain:</b> <span id="correct3"><br><input type="radio" name="q3" value="correct">Ahuhu</span> <br><input type="radio" name="q3" value="wrong">Bchec <br><input type="radio" name="q3" value="wrong">Cdoddoe <br><input type="radio" name="q3" value="wrong">quebec </li><br> </ol><br><br> <center><input type="button" onClick="checkQuiz()" value="check quiz"> <hr> <textarea cols="80" rows="10" name="output"></textarea></center> </form> </body> </html> Hello, i really need help making a quiz in html. I want to make a site where users can answer questions...but...i am on new ground here. I managed to do some cool things using ap div (thanks to dreaweaver, apdiv is a relatively simple tool for users like me) but now comes the hard part. I made a wrapper in wich i want to put my questions. But i do not know the code, can someone make an example for me? I also want to give grades to users after the test is finished. How do i do this? Let say i have the question : " The color of the sky is?" a. blue b. orange c. purple d. brown How do i write the code for this, and how do i write the code to give grades to the users after the test is finished. Please, please, please do not tell me to look on google because my head is going to explode. I am sorry for my bad english, it is not my first language. I've copied this from a site's source code, but it doesn't work on mine. It directs you to the next page, whatever you answer. Here is the page: http://www.freewebs.com/jaceyanimation/ebook.htm Here is the code i made: HTML Code: <table align=center width='97%' cellspacing=10 cellpadding=2 border=0> <form action='/signup_basic.php' method=post> <tr> <td><b>1. What is the street number of the orders headquarters ?</b></td> <td><select name='5'> <option value=1 SELECTED>9</option> <option value=2>10</option> <option value=3>11</option> <option value=4>12</option> <option value=5>13</option> <option value=6>14</option> <option value=7>15</option> </select></td> </tr> <tr> <td><b>2. What is Luna's last name ?</b></td> <td><select name='5'> <option value=1 SELECTED>Lonely</option> <option value=2>Lilac</option> <option value=3>Leona</option> <option value=4>Lee</option> <option value=5>Lovegood</option> <option value=6>Lier</option> <option value=7>Lehman</option> </select></td> </tr> <tr> <td><b>3. How much is a Unicorn Horn ?</b></td> <td><select name='2'> <option value=1 SELECTED>24 Galleons</option> <option value=2>26 Galleons</option> <option value=3>28 Galleons</option> <option value=4>30 Galleons</option> <option value=5>32 Galleons</option> <option value=6>9 Sickles</option> <option value=7>1 Knut</option> </select></td> </tr> <tr><td colspan=2 align=center><br><br> <input type=hidden name=action value=agree> <input type=button value=' Go Back ' onClick="location.href='javascript:javascript:history.go(-1)';"> <input type=button value=' Download ' onClick="location.href='http://www.freewebs.com/jaceyanimation/downloadebook.htm';"></td></tr> </form></table> The answers a 12 Lovegood 26 Can Someone please fix this I have just developed a series of quizzes to post on my Bible Web site. It works fine, but I'm wondering if there are any alternative ways of doing what I want. Here's how I designed each quiz. There is a "main" html file that creates two frames: <frameset rows="70%,30%"> <frame src="1SamuelQuiz.html" name="QuizFrame"> <frame src="BlankAnswerPage.html" name="AnswerFrame"> </frameset> Then I created an html file with all the quiz questions in a numbered list (1SamuelQuiz.html). Here's an example of one item from the list: <p>Who was David's father?</p> <p><a href="1SamuelAnswer1.html" target="AnswerFrame">Click here for answer.</a></p> When the user clicks for the answer, it appears in the lower frame, while the questions remain visible in the upper frame. As I said, everything works fine, just as designed. However, this method does require a separate html file for each individual answer. The more quizzes I create like this, the number of files increases at an alarming rate! Is there any alternative design that would still allow the user to click to see an answer while keeping the quiz questions visible? Thanks. Bill I understand this is the HTML section and I'll be posting a little Java. Let's say you're going to take an online quiz to see your IQ. To 'check' the answer your query has to be sent and checked with an existing copy/data, right? If I wanted to see the answer to question three on the IQ test where would I find the existing copy/data? For instance, how would I figure out the answer? HTML Code: <p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="bLight" nowrap valign="middle"> <!-- Screen Reader Anchor--> <a name="question_34"><img src="/images/spacer.gif" width=1 height=1 alt="Question 34 text" border="0"></a> <span class="questionNumber"> Question 34</span> </td> <td class="bLight" align="right" colspan="5" nowrap valign="middle"> <span class="points">2 points</span> </td> <td class="bLight" align="right" nowrap valign="middle"> <a href="javascript:saveItem('_12398139_1','34')" class="inlineAction">Save</a> </td> </tr> <tr> <td valign="middle" align="center" rowspan="2"> </td> <td colspan=2 valign="top" width="100%"> <label for="True/False-_4495108_1"><!--RsQ_002-->The sky is blue.</label> </td> </tr> <tr> <td colspan=2 valign="top"> <a name="question_34_answers"><img src="/images/spacer.gif" width=1 height=1 alt="Question 34 answers" border="0"></a> <table> <script type="text/javascript"> formCheckList.addElement(new Check_Answer({ref_label:"34",name:"tf-ans-_12398139_1"})); </script> <tr> <td> <input type=radio name="tf-ans-_12398139_1" id="tf-ans-_12398139_1_1" value="true" > </td> <td><label for="tf-ans-_12398139_1_1">True</label></td> </tr> <tr> <td> <input type=radio name="tf-ans-_12398139_1" id="tf-ans-_12398139_1_2" value="false" > </td> <td><label for="tf-ans-_12398139_1_2">False</label></td> </tr> </table> </td> </tr> </table> I'm new to HTML, so take it easy on me. I want to add an interactive form to a charity site I maintain. I used Zisp in the past, but we changed our Webspace provider recently and Zisp won't work there, (It's pretty limited anyway). I'm pretty good with HTML/CSS but I don't have a clue about PHP, CGI, Java etc. Can anyone suggest where I might start looking? (Being a charity, we don't have too much money to spend). Hello everyone, I want to know how to put the html code into my web of an television channel. Example: abc tv online. Greetings! A client needs to edit one page of their site remotely using a browser. I'm not sure how to proceed. Do they need a page with form fields that are password protected so only they can provide content? Is there another way to edit wysiwyg text online without using a separate application? Any help would be appreciated. Ok so I am trying to create an online registry where people with rare diseases can register their name what disease they have where they live and it will email them of those around them with the same thing. Can someone please tell me how to do this or where i can go to learn how to do this. Thanks I am a beginner! (I thought I would warn you.) Can someone here please tell me how to do the code for being able to see how many viewers are online at a particular site. For instance so all shoppers can see how many people are shopping in that store at the same time? I hope that makes sense. Many thanks in advance!! Can someone please explain how forms work please. I know how to set them up and send them to another file to be processed. How do i set up the file to process it? Example: My form: Quote: <form action="http://www.music-web.org/webmail2.php" method="post" name="webMailLogin"> <input type="hidden" name="submitted" value="y" /> <table border="0" cellpadding="0" cellspacing="0" width="100%" bgcolor="#FFFFFF"> <tr> <td colspan="2"><img src="http://music-web.org/images/clearpixel.gif" width="1" height="12"></td> </tr> <tr> <td class="black12" align="right"><b>Login: </b></td> <td class="QuickDomainCheck"><input type="text" tabIndex="1" name=" login_name " size="20" value=""></td> </tr> <tr> <td colspan="2"><img src="http://music-web.org/images/clearpixel.gif" width="1" height="12"></td> </tr> <tr> <td class="black12" align="right"><b>Password: </b></td> <td class="QuickDomainCheck"><input type="Password" tabIndex="2" name=" passwd " size="20" value=""> <input type="image" src="http://www.music-web.org/images/webmail/login.gif" align="absbottom" value=" Login " tabIndex="3" ></td> </tr> <tr> <td colspan="2" align="left"> <BR><BR><div class="text" style=" color:000000; font-family:arial; font-size:10px; padding-left:124; padding-top:5">Login using your email address and password.</div> </td> <td class="black10"><br><br></td> </tr> </table> </form> It gets sent to: Quote: <script language="JavaScript" TYPE="text/javascript"> function submitMe() { loginName = ' I need the value of the form in here '; //find @ atPos = loginName.indexOf("@"); //check >=1 if (atPos >= 1 ) { //get the domain name length domainLength = (loginName.length +1) //get the domain name domain = loginName.substring(atPos +1, domainLength ); //get the username user = loginName.substring(0,atPos); //set up the username to post to the mail form document.implogin.loginuser.value = loginName; document.implogin.imapuser.value = user; document.implogin.pass.value = 'I need the value of the form in here '; document.implogin.maildomain.value = domain ; document.implogin.maildomain.realm = domain; document.implogin.url.value = 'http://webmail.'+ domain + '/horde/login.php';document.implogin.action = 'http://webmail.'+ domain + '/horde/OWH_Logout.php'; document.implogin.submit(); } else { alert('Please enter in your full email ie. someone@yourdomain.com'); } } </script> I hope this isn't too confusing and someone can help. hi guys i have this requirement where in the client redirects a html page to my site and i have to provide him an interface from my site to edit the html ( which can be done using FCKeditor or Tinymce) after authentication and then when he presses save Ill have to save the html back to his server this is where i have some confusions, inorder to save back on his server do i need his ftp login credentials or is there any other way to circumvent it, pls let me know thx in advance I have this website that i run for a person selling select products. Everything is going fine, but it would really help if i could make an adminstrator's page for the client, that would let them input a picture, name, description, price and have that posted to the product listing page. Ive seen some related posts in different places that mentioned use of php and mysql, but i havent found the right combo for what im looking for. If someone could help me out, it would be very appreciated. I'm helping a friend who has set up a website to market ebooks. The page is fine, we have a Paypal account to receive payments but what I don't know how to do is automatically allow the purchaser access to the book once payment has been made. The easier way is email it after confirmation of the payment but there must be an automatic way of doing this? Any help would be appreciated. I'm creating a RPG, using Unity 3d game engine, the game is called Venturo Online, the project was started on the 20th Jan, we have setup the site we are going to be using, we need some html help with the site, can anyone offer their help? Please leave your details below, or email : community@venturoonline.com, thanks. hiya,i have a msn group and it doesn't support java scripts i searched on google tried a lot of webcounters but they are all with java .. is it possible to have an users counter without any java ?? just simple html.Thanks in advance ! *love - Elise hello; PROBLEM 1 - if I create an product inventory database and have catalog_page_template.php dynamically output webpages with the applicable product content ( product photo, cost, s&h, weight, etc ), search engines will not be able to store the catalog webpages, since they do not exist except when called by browser; any suggestions on the best way to build an online catalog? thanks dsdsdsdsd |