Personality Quiz XML Engine
This is the quiz engine that uses the XML the Personality Quiz XML Converter created.
by Anov Siradj
HTML
<div id="Qstage"></div>
CSS
@import url(http://fonts.googleapis.com/css?family=Cantora+One);
#Qstage {
font-family:'Cantora One', sans-serif;
border: thin solid #666;
position:relative;
overflow:hidden;
margin: auto;
font-size: 16pt;
height: 500px;
width: 700px;
padding: 25px;
}
#title {
font-size: 18pt;
font-weight: bold;
margin-bottom: 10px;
}
#allQuestions {
list-style-type:decimal;
}
.questionSet {
position:absolute;
width: 500px;
top: 200px;
margin-left:auto;
margin-right:auto;
}
/************************************
Multiple Choice CSS
************************************/
.choices {
list-style-type: lower-alpha;
margin-left: 50px;
}
.choices li {
position:relative;
}
.choices li ol {
position:relative;
left:20;
}
.choices a {
text-decoration: none;
}
.choices a:hover {
color: #F00;
}
/************************************
results CSS
************************************/
.results {
position:absolute;
width: 500px;
top: 200px;
margin-left:auto;
margin-right:auto;
}
.resultsTitle {
display: block;
font-size: 18pt;
font-weight: bold;
margin-bottom: 10px;
}
JavaScript
var ajaxEchoXML = "<totalquiz><title>How Daring Are You?</title><intro>Are you quick to take on new adventures, or is your first instinct to wait and watch? Take this quiz to see how much you'd dare to do!</intro><quiz><questionset num='0'><question>You're at a friend's slumber party. Which of the following would you be willing to do?</question><choices><option value='0'>sleep with a stuffed animal</option><option value='1'>tell the group about an embarrassing moment</option><option value='2'>sing the alphabet song like an opera singer in front of everyone</option></choices></questionset><questionset num='1'><question>Your class is on a field trip to the zoo, where you're greeted by three zookeepers with their animals. Which of the following animals would you most want to pet?</question><choices><option value='0'>tortoise</option><option value='1'>iguana</option><option value='2'>python</option></choices></questionset><questionset num='2'><question>If you could go on any of these vacations, which would it be?</question><choices><option value='0'>an ocean cruise</option><option value='1'>a river-rafting trip</option><option value='2'>a rain forest safari</option></choices></questionset><questionset num='3'><question>A friend and her family are going snow skiing. When they ask if you'd like to go along, you</question><choices><option value='0'>tell them there's a book you've just got to finish.</option><option value='1'>ask if you can watch for a while.</option><option value='2'>Ask, 'Where do I sign up for a lesson?'</option></choices></questionset><questionset num='4'><question>Your best bud's having her birthday dinner at a sushi restaurant, but you've never eaten sushi before. You</question><choices><option value='0'>hope they have grilled cheese on the menu.</option><option value='1'>decide to try the cucumber roll, since you know what cucumber tastes like.</option><option value='2'>go for the raw sashimi tuna because your friend says it's...