SamVII
12-07-2010, 02:18 PM
Hey guys, basically Im creating a webpage for my univeristy degree, and I've decided to script a quiz, basically there will be several multi choice questions, and these will add to one answer, heres an example:
Whats your favourite genre of music?
(choice1)
(choice2)
(choice3)
Whats your favourite favourite musical instrument?
(choice1)
(choice2)
(choice3)
etc
answer = blahblahblah
Heres my questions code here, as you can see im using values, im trying to create the answers by adding the values up, for example answer 1=5
2=10
3=100
<div id="quiz">
<h4>
1) What is your favourite genre of music?</div>
<div class="qselections">
<input type="radio" value="1" name="question1">a)Rock<br>
<input type="radio" value="2" name="question1">b) Punk<br>
<input type="radio" value="3" name="question1">c) Metal<br>
<input type="radio" value="4" name="question1">d)Electronica/Dance/Club<br>
</div>
<br>
<div class="qheader">
2) What is your favourite decade of music></div>
<div class="qselections">
<input type="radio" value="1" name="question2">a) 60's<br>
<input type="radio" value="2" name="question2">b) 70's<br>
<input type="radio" value="3" name="question2">c) 80's<br>
<input type="radio" value="4" name="question2">d) 90's<br>
<input type="radio" value="5" name="question2">d) 00's<br>
</div>
<br>
<div class="qheader">
3) Which is your favourite instrument?</div>
<div class="qselections">
<input type="radio" value="1" name="question3">a) Guitar<br>
<input type="radio" value="2" name="question3">b) Drums<br>
<input type="radio" value="3" name="question3">c) DJ Decks<br>
<input type="radio" value="4" name="question3">d) Piano<br>
</div>
<br>
<div class="qheader">
4) Do you prefer handheld or console?</div>
<div class="qselections">
<input type="radio" value="1" name="question4">a) Handheld<br>
<input type="radio" value="100" name="question4">b) Console<br>
<h4>
</div>
Im just curious how to script this? I havent done anything this difficult before, Im wondering how I would code this.. The only quiz I have done before is via prompts, any help will be much apprieciated!
P.s feel free to ask any questions if it is to help!
Whats your favourite genre of music?
(choice1)
(choice2)
(choice3)
Whats your favourite favourite musical instrument?
(choice1)
(choice2)
(choice3)
etc
answer = blahblahblah
Heres my questions code here, as you can see im using values, im trying to create the answers by adding the values up, for example answer 1=5
2=10
3=100
<div id="quiz">
<h4>
1) What is your favourite genre of music?</div>
<div class="qselections">
<input type="radio" value="1" name="question1">a)Rock<br>
<input type="radio" value="2" name="question1">b) Punk<br>
<input type="radio" value="3" name="question1">c) Metal<br>
<input type="radio" value="4" name="question1">d)Electronica/Dance/Club<br>
</div>
<br>
<div class="qheader">
2) What is your favourite decade of music></div>
<div class="qselections">
<input type="radio" value="1" name="question2">a) 60's<br>
<input type="radio" value="2" name="question2">b) 70's<br>
<input type="radio" value="3" name="question2">c) 80's<br>
<input type="radio" value="4" name="question2">d) 90's<br>
<input type="radio" value="5" name="question2">d) 00's<br>
</div>
<br>
<div class="qheader">
3) Which is your favourite instrument?</div>
<div class="qselections">
<input type="radio" value="1" name="question3">a) Guitar<br>
<input type="radio" value="2" name="question3">b) Drums<br>
<input type="radio" value="3" name="question3">c) DJ Decks<br>
<input type="radio" value="4" name="question3">d) Piano<br>
</div>
<br>
<div class="qheader">
4) Do you prefer handheld or console?</div>
<div class="qselections">
<input type="radio" value="1" name="question4">a) Handheld<br>
<input type="radio" value="100" name="question4">b) Console<br>
<h4>
</div>
Im just curious how to script this? I havent done anything this difficult before, Im wondering how I would code this.. The only quiz I have done before is via prompts, any help will be much apprieciated!
P.s feel free to ask any questions if it is to help!