HTML - Question About Quiz And Answer Form
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. Similar Tutorialsi am a member of a virtual pet site and have my own web space on there , i know basic html and have come up with some good pages so far but the one thing i dont know how to do is this: when another member from the site views my pages i would like there user name to show on the page, ie "welcome to bobob1012" can anyone tell me just how to do this ? thanks so much for any help you can offer. Question: 1 Which of the following is invalid value for the shape attribute of an area tag? a. circle b. tri c. rect d. poly Question: 2 A few lines in an HTML paragraph are to be formatted differently from the rest of the lines. Which tag will assist in this? a. div b. p c. span d. format Question: 3 Which of the following values for the scrolling attribute for the frame tag is not valid? a. yes b. default c. auto d. no Question: 4 You placed four radio buttons on a web form. You want the users to specify whether they are male or female and whether they are married or single. The code is as follows: Male: <input type="radio" checked name="chk" value="male"> Female: <input type="radio" name="chk" value="female"> Married: <input type="radio" checked="checked" name="chk" value="married"> Single: <input type="radio" name="chk" value="single"> What is wrong with the above code? a. It will allow the user to choose only the male and the married options. b. It will allow the user to choose only the female and single options. c. It will allow the user to choose only one option out of the four. d. It will allow the user to choose all the four options at the same time. Question: 5 Which of the following attributes comes in handy when borders have to be put between groups of columns instead of every column? a. col b. colgroup c. rowspan d. row Question: 6 What would you infer from the following code in an HTML 4.01 Web site? <body topmargin=2 leftmargin=2> a. The top margin and left margin of the webpage is 2 pixels. b. The bottom margin and right margin of the web page is 2 pixels. c. Both of the above. d. None of the above. The topmargin and leftmargin attributes are not valid HTML 4.01 body attributes. Question: 7 Where must the styles specified for a CSS internal style sheet be located? a. Inside a table tag b. Inside a div tag c. Inside the head tag d. Anywhere on the webpage Question: 8 Which of the following is/are a valid value for the type attribute of the input tag? a. text b. icon c. reset i have some softwares and i dont want to let the people download and save them to their computers. i just want that people should be able to install the software and use it, but they should be not able to have a copy of it. is it possibe to do so? i mean running the installation directly from the site. so that i can sale the cds of my programs. i have a idea to make my programs PlugIn. but i also don't know how to create them. or is there any other solution for this? if yes then let me know... anyone please help me out! thanks! I have a table and after I select the question (the ball) I would like the answer to come up in another column in that table. Is that too much? Keep'er simple please. Thanks. Ok, I have no idea why this is happening... Here's the scenario... I have 3 photo's.. Photo 1... Is the top image of the site with rounded corners, and a drop shadow... Photo 2... Is the content area... that matches the border and drop shadow from the top... Photo 3... Is the bottom image... again has rounded corners and drop shadow... To put them together I created a table with 3 rows, and 1 column... and went to each section and added the photo as the background image since I still need to be able to write the website text.. The table has no spacing, padding, or any border of any type... But when I go into previewing it in my browser... (I've tried both firefox, and ie) You can see a slight spacing between the rows... so instead of the photos siting flush they have a space in between them... breaking up the flow of the site... How do you fix this? Or is there a simpler way to get accomplished what I want accomplished??? I want to create a form with a text box that has a specific answer. If the correct answer is typed in, the submit button redirects to one page. If the wrong answer is typed, the form redirects to another page. Is there any way to do this? I am trying to get three colums of work, picture on the left, text middle, pictures on the right. should I be working with nested tables? attached a pix to show what I mean, Help! How to put text in input fields? -------------------------------------------------------------------------------- Hi everyone, What I am asking is more complicated than the thread title says. Can someone please tell me how, or post some code to show how I can make input fields with these properties: 1. Make text appear in an input field whilst off focus but dissapear whilst on focus, re-appear again if put back on focus. 2. The user can type text in the field and edit it and when the input field is off focus the text he wrote remains there. 3. If the user completely erases the text he wrote and puts the input field off focus the default text (stated in 1.) re-appears. 4. Make a password input field without the default text (1.) being displayed as stars (hidden charaters) with same features as 1. , 2. , and 3. ofcourse. Can anyone please help me?... Evan We want html for the following: an image(#1), on top of an image(#2); but image #1, is movable(move able) around image #2. For example: image #2 = this image #1 = this ___________________________________ | ______________________________ | | |image #1 (move around image#2)| | | |_______________________________| | |____image #2______________________| Hey, Firstly let me just say, Hi everyone, first time here, etc etc. Right I shall get straight to the point of why I am here, and hope that some kind soul can help me. 1. I work in a educational environment, and we are looking at publishing our students timetables on the intranet, running on a link something like http://intranet/students/timetable/ inside that file would be their timetable (just a plain old HTML doc) each student already has a unique ID and their file would take that name, so what I want to do, on our main index page is put a little tiny form in at the top, of which they can just type in their number, press go, and it to bring up there timetable. Buttttt! I have no idea how to do it, the actual form would need the preset link then take the inputed data, add it too the end, then forward on to the said page. is it possible? if so could you kindly tell me how? or a little script would be god sent Thanks in advance for that one if you reply. 2. I was going to do number two, but after all of my typing it dawned on me what the solution was, doh! Kieran. Ok, I am building my own site and I am getting hung up on little glitches that I don't know how to fix. Posting on this forum is not effective enough. I want to hire a service that will answer and help me fix the glitches on my site. Any suggestions? OK so I am grabbing this code off of a local news site (WRAL) and when I embed into a myspace page, only portions of the script are showing up, not the video. So there is something wrong with the code itself i'm sure, I just don't know what. Here is the code. Do you guys see any errors he Quote: <script src="http://www.wral.com/entertainment/video/2820107/?version=embedded" type="text/javascript"></script><script type="text/javascript"> width=330; height=280; wral_insert_video_player_2820107(width,height); </script> 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. 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> 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 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! Hi, how can I position a <form> om my page in html? WHat or how does it work? please give example. thanks I have created a form that just consist of a comments section and a submit button. Right now it is set to email the comments posted. The problem is we would like to keep the persons identity secret. See, when the person hits submit it brings up their email software and sends the email with their email address. We dont want to know their email address. So question is - is there a way of sending the email when they hit submit w/o us seeing their email address? or is there a different way of the person sending their comments w/o us knowing who it came from? Thanks! here is my html: <table><form method= "post" enctype="text/plain" action="mailto:my@my.com"> <colgroup align="left" valign="top"> <tr> <td>Comments:</td> <td><textarea name="comments" rows="5" cols="70" /></textarea></td> </tr> <tr> <td></td> <td><input type="submit" value="Submit" />  <input type="reset" value="Clear" /></td> </tr> </colgroup> </table> Hi. I want to make a form with an input field in one table cell and the submit button in another cell. How can i do this? Parashurama Hello, Please forgive me if this makes no sense at all, I have been trying to figure this out for awhile now and just dont really understand forms. I am trying to figure out how to make the form on my website work. http://www.legrandmotorsports.com/service_status/ The purpose of the form is to have customers enter their service tag number, click submit, and be able to view the status of their service work. Heres what I am trying to do... Whether or not its possible, I dont know? I would upload the service status html pages by thier tag number under the service_status directory. Example: legrandmotorsports.com/service_status/4151.html Now, my question is, is there a way to set this form up, so that the number the customers typed in, would be automatically put into the link "legrandmotorsports.com/service_status/SERVICE NUMBER HERE.HTML" Then whenever they click submit, the number they typed, would be added to the link, taking them to their service status updates. Is this possible? Or do you have any recommendations on how I could/should do this? Any help is grately appreciated. Pete |