HTML - Online Quiz Problem(javascript/html)
Hello 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. Similar TutorialsHello! 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! Hello everyone, I want to know how to put the html code into my web of an television channel. Example: abc tv online. Greetings! Hey guys I am after an online html editor So lets say I have a simple html site I put the editor into an admin folder ( password protect it ) so when i go to the editor I can make changes to the html pages - add images etc. Does anything like this exist? preferably free ware on open source cheers 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! Anyone know of an inexpensive and SEO friendly way to display book pages in an online html reader? I am developing a bookstore website where people can read the entire book online before buying, and the option of using an online flash-based PDF reader doesn't work for SEO. In the html format, the books would have to be displayed page by page so people couldn't steal and distribute the entire book easily. Is the only way to do this by programming every page or is there a program, script or compiler that is good for SEO and will do the job cheaply? There are many online libraries that have hundreds of thousands of pages readable online, so how do they do it cheaply? Thanks. hello everyone i am new in this forum. I need help with html code. I have to make an online hotel reservation system. Firstly, i made frontpage of hotel online see below Attached 1. Now i need help how to make Check in see example below attached 2 how check in look like (taken somewhere from internet). For "Check in" i want background like colours should be same as frontpage online. The hotel logo given in frontpage has been taken from http://www.tasting-australia.com.au/...otel_logo.jpg. I write code in notepad and save as htm. Please show full working html code for check in as explained above. I hope this forum will help me. Hey guys, I'm new to HTML... Well not completely new, I know the basics like how to bold stuff, how to make a new paragraph, line-breakers, all that easy stuff. Now I have a project to do by the end of this summer... I'm expected to make a site where people can Rent Toys online (dont ask ) . So I have to be able to have Paypal Access in my site. Now I need a bit of help... I started reading a couple of tutorials on this site and I'm trying my best to understand them. My question is, where do I start writing or developing my site? I can't just put it on Microsoft Word, there has to be a web page developing server or site I can use.... Any recommendations? I can pay whatever the cost is; After all in the end (if I finish everything) my reward is breath-taking... If there is a specific web developing company or server that deals with Paypal, or online purchasing, that would be helpful information to know as well. Thanks guys! That's all the questions I have for now Hi, I have a template with an online form already installed but I need help creating a contact.php file to get the form working and linked to my email address. Here is the code to my online form: PHP Code: <img src="images/sym2.jpg" style="margin-right:5px "><strong class="yellow">Online Contact Form<br> </strong><br> If you have any questions at all please contact us and we'd be glad to help:</div> <div class="yellow" style="margin-left:7px; margin-top:10px "><strong>Name:</strong><input type="text" name="n" style="width:128px; height:19px; font-family:tahoma; font-size:11px; margin-left:7px " onFocus="if(this.value=='Your message')this.value='';"></div> <div class="yellow" style="margin-left:7px; margin-top:4px "><strong>E-mail:</strong><input type="text" name="n" style="width:128px; height:19px; font-family:tahoma; font-size:11px; margin-left:4px " onFocus="if(this.value=='Your message')this.value=';"></div> <div class="yellow" style="margin-left:7px; margin-top:4px "><strong>Your message he </strong></div> <div class="yellow" style="margin-left:7px; margin-top:4px "><textarea type="text" name="n" style="width:169px; height:63px; font-family:tahoma; font-size:11px; overflow:auto"></textarea></div> <div style="margin-top:10px; margin-left:68px "><input type="image" src="images/clear.jpg" style="margin-right:6px "><input name="" type="image" src="images/send.jpg"> Any help or advice would be most appreciated. Code: function send_onclick(frmName) { var bolSubmit; bolSubmit = true; if (frmName.email.value == "") { alert("You must enter an email address"); bolSubmit = false; } if (bolSubmit == true) { frmName.submit(frmName); } } </script> </head> <body> <form name="frmName" method="post" action="validate.asp"> Enter your name in the text box. If nothing is entered, a warning <br /> message will be displayed. Only when you enter something into the <br /> text box will the page be submitted. <br /><br /> Please enter your name : <input type="text" name="email" size="20" /><br /> <input type="button" name="butSent" value="Do it" onclick="return send_onclick(frmName)"> </form> </body> </html> Hi there, I would like to know the purpose of having var bolSubmit in the code above. Also, why is it that "form name" allows my code to work even though there is a warning stating that it is outdated, but when I change it from "form name" to "form id", it does not complain of the warning anymore, but instead my code does not work. Please advise. Hello everyone. =) There's a video I want to put on my website; it's about 20 MB. The problem is, whenever I try to use either of my FTP programs (FileZilla and CoreFTP), the file always gets interrupted at around 12 MB. I've tried uploading the file about 10 times, and I keep having this problem. So...I was wondering if there's a way I can break the file up (into, say, twenty 1 MB files), upload those segmented files, and then merge them together online? I don't want my friends to download 20 individual files (that's a bit much, don't you think?); I'd like for them to just download that one, full size video. Plus, I won't be too pissed if a 1 MB file messes up. =) Do you know of any software (or websites) that can do this? (I found one website today called Wobzip, but I'm not 100% certain it'll do what I want. I'm kinda confused with some of the terminology...) Please help. =(Thanks in advance!) Hey, For some reason my table portion of this code does not display... Also, my background color or my td color also do not display...HTML code is posted below. Any help would be awesome... Thanks! HTML Code: <html> <head> <title>Business Projection Site</title> <style> body {bacground-color: #00AAAA} table {border-collapse: collapse} td {background-color: rgb(0,230,0)} </style> <script> L=211; verty=Math.floor(L/20)*1.0; function forecast(){ a1=parseFloat(document.form1.input1.value); a2=parseFloat(document.form1.input2.value); a3=parseFloat(document.form1.input3.value); a4=parseFloat(document.form1.input4.value); d1=a2-a1; d2=a3-a2; d3=a4-a3; dmax=Math.max(Math.abs(d1),Math.abs(d2),Math.abs(d3)); dmin=Math.min(Math.abs(d1),Math.abs(d2),Math.abs(d3)); err=dmax-dmin; avga=(a1+a2+a3+a4)/4.0; erra=err/avga; avgd=(d1+d2+d3)/3.0 r1=a2/a1; r1=a3/a2; r1=a4/a3; rmax=Math.max(r1,r2,r3); rmin=Math.min(r1,r2,r3); errg=rmax-min; avgr=(r1+r2+r3)/3.0; if(errg<erra)stype="A"; else stype="g"; if(stype="A") { a5=a4*avgd; a6=a5*avgd; a7=a6*avgd; a8=a7*avgd; } else{ a5=a4*avgr; a6=a5*avgr; a7=a6*avgr; a8=a7*avgr; } document.form1.out1.value=a5.toFixed(2); document.form1.out2.value=a6.toFixed(2); document.form1.out3.value=a7.toFixed(2); document.form1.out4.value=a8.toFixed(2); msglin='Your data is more like a linear trend than a % growth. '; msglin= msglin+'The average change per period is '+avgd; msgexpgr='Your data is more like % growth than linear trend. '; avgrgr =100.*(avgr-1.0); avgrgr=avgrgr.toFixed(2); msgexpred='Your data is more like % reduction than linear trend. '; avgrred = 100.*(1.0-avgr); avgrred=avgrred.toFixed(2); msgexpred= msgexpred+'The average reduction per preiod is '+avgrred+'%'; if(stype=="A")document.form1.anal.value=msglin; else if(avgr>1.0) document.form1.anal.value=msgexpgr; else document.form1.anal.value=msgexpred; } function plot() { var values=new Array (a1,a2,a3,a4,a5,a6,a7,a8); var yt2=new Array(8); var xt1=new Array(8); var minPV=9999; var maxPV=-9999; for (i=0; i<8; i++){ if (values[i]<minPV) minPV=values[i]; if (values[i]>maxPV) maxPV=values[i]; } for (i=0; i<8; i++){ yt2[i]=(values[i]-minPV)/(maxPV-minPV)*(L-(2*verty))+verty; } for (i=0; i<8; i++){ xt1[i]=Math.round((L-(2*verty))/(8-1)*i+verty); } for (i=0; i<4; i++){ line1(xt1[i], yt2[i], xt1[i+1], yt2[i+1], "#FFF7F7"); points (xt1[i], yt2[i], "#000000", 3); } for (i=4; i<8; i++){ line1(xt1[i], yt2[i], xt1[i+1], yt2[i+1], "00EEEE"); points (xt1[i], yt2[i], "#000000", 3); } function clearplot() { for(i=1;i<=L;i++){ for(j=1;j<=L;j++){ a=document.getElementById(j+","+i); a=style.backgroundColor="#FF7777"; } } } function point(xx1,yy1,color1) { yy1=Math.round(yy1); xx1=Math.round(xx1); idPoint=(L-yy1+1)+","+xx1; cell1=document.getElementById(idPoint); cell1.style.backgroundColor=color1; } function points(xx1,yy1,color1,n) { n2=Math.floor(n/2); for(i1=0; i1<n; i1++) for(j1=0; j1<n; j1++) point(xx1-n2+i1,yy1-n2+j1,color1); } function line1(xx1, yy1, xx2, yy2, color1) { m=(yy2-yy1)*1.0/(xx2-xx1); if (Math.abs(xx2-xx1) >= Math.abs(yy2-yy1)) { for (j=xx1; j<=xx2; j++){ y=m*(j-xx1)+yy1; point(j,y,color1); } } else { ymax=Math.max(yy1,yy2); ymin=Math.min(yy1,yy2); for(k=ymin; k<=ymax; k++){ x=(k-yy1)/m+xx1; point(x,k,color1); } } } function expGrowth() { document.form1.input1.value="10.0"; document.form1.input2.value="20.0"; document.form1.input3.value="40.0"; document.form1.input4.value="80.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function expReduction() { document.form1.input1.value="200.0"; document.form1.input2.value="100.0"; document.form1.input3.value="50.0"; document.form1.input4.value="25.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function linGrowth() { document.form1.input1.value="10.0"; document.form1.input2.value="20.0"; document.form1.input3.value="30.0"; document.form1.input4.value="40.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } function linReduction() { document.form1.input1.value="40.0"; document.form1.input2.value="30.0"; document.form1.input3.value="20.0"; document.form1.input4.value="10.0"; document.form1.out1.value=''; document.form1.out2.value=''; document.form1.out3.value=''; document.form1.out4.value=''; document.form1.analysis.value=""; } </script> </head> <body> <h2>Revenue Projection</h2> <form name='form1'> <b>Enter 4 historical data points:</b> <br/> <pre>1. Enter at least 2 data points in this section to forecast and plot your data. 2. Or click on one of the buttons below for examples of linear or exponential growth, or shrink or linear reductions growths.</pre> <p> <input type= 'textfield' size=15 name='input1' /> <input type= 'textfield' size=15 name='input2' /> <input type= 'textfield' size=15 name='input3' /> <input type= 'textfield' size=15 name='input4' /> <p> <input type="button" value="Exponential Reduction" onclick="expReduction()"/> <input type="button" value="Linear Reduction" onclick="linReduction()"/> <input type="button" value="Linear Growth" onclick="linGrowth()"/> <input type="button" value="Exponential Growth" onclick="expGrowth()"/> <p> <b>Predicted Future Values:</b> <p> <input type="text" name="out1" size=15 /> <input type="text" name="out2" size=15 /> <input type="text" name="out3" size=15 /> <input type="text" name="out4" size=15 /> <p><input type="button" value="Forecast" onclick="forecast()"> <p><input type="text" size="115" name="anal" /> </form> <h4>Normalized Plot:</h4> <p> <input type="button" value="Plot Data" onclick="plot()"> <input type="button" value="Clear Plot Data" onclick="clearplot()"> <p> <table> <script> for(i=0; i<L; i++){ document.write("<tr>"); for(j=0; j<L; j++){ document.write("<td id='"+i+","+j+"'>"); } document.write("</tr>") } </script> </table> </body> </html> Hey everyone, I'm having a problem with a Flash .swf file in my HTML page. If I input the code one way, it works in Firefox and not in IE. If I do it another way, it works in IE and not Firefox. The approach I was thinking of taking was using conditional statements in Javascript, however I'm having problems arranging the code to properly implement it. And believe me, I've reworked this file and I'm getting nothing that works on both at the same time. Suggestions for both methods would be great -- If you'd like me to post the code I could do so. Thank you! 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. My html problem keeps failling, with all my image codes.. shown for 10 errors which are all for the images what's wrong? Here is the code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- New Perspectives on HTML and XHTML 5th Edition Tutorial 2 Case 2 Fiddler Home Page Author: Date: 2-16-2011 Filename: home.htm Supporting files: fiddler.jpg --> <title>, ITSE 1411 Lab Project 2, Tutorial 2 Case 2, Due 02/23/2011</title> </head> <body> <div> <img src="fiddler.jpg" alt="Fiddler on the Roof" /> <hr /> <a href="home2.htm"><img src="home.jpg" alt="home" /></a> <a href="slide1txt.htm"<img src="start.jpg" alt="start" /></a> <a href="slide1txt.htm"<img src="back.jpg" alt="back" /></a> <a href="slide2txt.htm"<img src="forward.jpg" alt="forward" /></a> <a href="slide6txt.htm"<img src="end.jpg" alt="end" /></a> <br /> <a href="slide1txt.htm"<img src="thumb1.jpg" alt="slide1" style="border-width: 5" /></a> <a href="slide2txt.htm"<img src="thumb2.jpg" alt="slide2" style="border-width: 0" /></a> <a href="slide3txt.htm"<img src="thumb3.jpg" alt="slide3" style="border-width: 0" /></a> <a href="slide4txt.htm"<img src="thumb4.jpg" alt="slide4" style="border-width: 0" /></a> <a href="slide5txt.htm"<img src="thumb5.jpg" alt="slide5" style="border-width: 0" /></a> <a href="slide6txt.htm"<img src="thumb6.jpg" alt="slide6" style="border-width: 0" /></a> </div> <hr /> <div> <img src="slide1.jpg" alt="slide1" /> </div> <blockquote> <p><i>Do You Love Me?</i> sung by Deb Ingalls and Thomas Gates</p> </blockquote> </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 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). 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. |