<html>
<head>
<title>
Quiz me pls
</title>
<style>
body{overflow-y:hidden;
background:#bb9fd6;
}
#layout{position:absolute;
width:894px;
height:599px;
left:126px;
right:0px;
top:0px;
bottom:0px;
border:0px solid #000000;
overflow:hidden;}
#mybody{position:absolute;
width:894px;
height:524px;
top:70px;
left:0px;
right:0px;
bottom:0px;
background:bb9fd6;
border:0px;
overflow-x:hidden;
overflow-y:auto;}
#header{position:absolute;
width:894px;
height:71px;
left:0px;
right:0px;
top:0px;
bottom:0px;
border:0px solid #000000;
background:url(file:\\Server3\users\0321048\win\try.gif);
background-repeat:no-repeat;}
a.nav1, a.nav1:link, a.nav1:visited{text-decoration:none;
text-align:center;
height:30px;
width:114px;
border:0px cornflowerblue;
font-family:verdana;
font-size:12px;
color:black;
margin-top:0px;
margin-left:0px;
margin-bottom:0px;
background:corflowerblue;
line-height:25px;
line-width:25px}
a.nav1:hover{background:black;
color:white;}
h1{font-family:verdana;
font-size:100%;
text-align:center;}
div.sidebar {position: absolute;
background-color: cornflowerblue;
top: 0;
left: 0;
width: 125px;
height: 100%;
padding-left: 6px;
padding-right: 4px;
padding-top: 6px;
font-size: 16pt;
overflow:hidden;}
p.green {font-size:16pt;
color:green;}
</style>
</head>
<body>
<div class="sidebar">
<marquee>Nav links</marquee>
<a class="nav1" href="mainpage.html">Main Page</a>
<a class="nav1" href="instruction.html">Instructions</a>
<a class="nav1" href="quiz.html">Quiz</a>
</div>
<div id="layout">
<div id ="header">
</div>
<div id="mybody">
<br>
<h1>Main Page</h1>
<script type="text/javascript">
window.onload = function() {
var r;
var row;
var cell;
var dup = new Boolean();
var stack = new Array();
var answer = new Array();
var answera = new Array();
var random = new Array();
var stackRandom = new Array();
var answerRandom = new Array();
var answerRandoma = new Array();
stack[0]="question 1";
stack[1]="question 2";
stack[2]="question 3";
stack[3]="question 4";
stack[4]="question 5";
stack[5]="question 6";
stack[6]="question 7";
stack[7]="question 8";
stack[8]="question 9";
stack[9]="question 10";
stack[10]="question 11";
stack[11]="question 12";
stack[12]="question 13";
stack[13]="question 14";
stack[14]="question 15";
stack[15]="question 16";
stack[16]="question 17";
stack[17]="question 18";
stack[18]="question 19";
stack[19]="question 20";
stack[20]="question 21";
stack[21]="question 22";
stack[22]="question 23";
stack[23]="question 24";
stack[24]="question 25";
answer[0]="ans 1";
answer[1]="ans 2";
answer[2]="ans 3";
answer[3]="ans 4";
answer[4]="ans 5";
answer[5]="ans 6";
answer[6]="ans 7";
answer[7]="ans 8";
answer[8]="ans 9";
answer[9]="ans 10";
answer[10]="ans 11";
answer[11]="ans 12";
answer[12]="ans 13";
answer[13]="ans 14";
answer[14]="ans 15";
answer[15]="ans 16";
answer[16]="ans 17";
answer[17]="ans 18";
answer[18]="ans 19";
answer[19]="ans 20";
answer[20]="ans 21";
answer[21]="ans 22";
answer[22]="ans 23";
answer[23]="ans 24";
answer[24]="ans 25";
answera[0]="ans 1 a";
answera[1]="ans 2 a";
answera[2]="ans 3 a";
answera[3]="ans 4 a";
answera[4]="ans 5 a";
answera[5]="ans 6 a";
answera[6]="ans 7 a";
answera[7]="ans 8 a";
answera[8]="ans 9 a";
answera[9]="ans 10 a";
answera[10]="ans 11 a";
answera[11]="ans 12 a";
answera[12]="ans 13 a";
answera[13]="ans 14 a";
answera[14]="ans 15 a";
answera[15]="ans 16 a";
answera[16]="ans 17 a";
answera[17]="ans 18 a";
answera[18]="ans 19 a";
answera[19]="ans 20 a";
answera[20]="ans 21 a";
answera[21]="ans 22 a";
answera[22]="ans 23 a";
answera[23]="ans 24 a";
answera[24]="ans 25 a";
var container = document.getElementById('results');
for (var i = 0; i < 10 ; i++) {
do{
dup = false;
r = Math.round((Math.random() * 24));
for (var m = 0; m <= random.length; m++) {
if (r == random[m]) {
dup = true;
break;
}
}
}
while (dup == true){
random.push(r);
stackRandom[i] = stack[r];
answerRandom[i] = answer[r];
answerRandoma[i] = answera[r];
row = document.createElement('tr');
cell = document.createElement('td');
cell.appendChild(document.createTextNode(i));
row.appendChild(cell);
cell = document.createElement('td');
cell.appendChild(document.createTextNode(stackRandom[i]));
row.appendChild(cell);
var z = Math.round((Math.random() * 1));
if (z==0){
cell = document.createElement('td');
var radioBtn = document.createElement('INPUT'); radioBtn.type='radio'; cell.appendChild(radioBtn);
radioBtn.setAttribute("ans","answer");
cell.appendChild(document.createTextNode(answerRandom[i]));
row.appendChild(cell);
cell = document.createElement('td');
var radioBtn = document.createElement('INPUT'); radioBtn.type='radio'; cell.appendChild(radioBtn);
radioBtn.setAttribute("ansa","answera");
cell.appendChild(document.createTextNode(answerRandoma[i]));
row.appendChild(cell);
container.appendChild(row);
}else if(z==1){
cell = document.createElement('td');
var radioBtn = document.createElement('INPUT'); radioBtn.type='radio'; cell.appendChild(radioBtn);
radioBtn.setAttribute("ansb","answerb");
cell.appendChild(document.createTextNode(answerRandoma[i]));
row.appendChild(cell);
cell = document.createElement('td');
var radioBtn = document.createElement('INPUT'); radioBtn.type='radio'; cell.appendChild(radioBtn);
radioBtn.setAttribute("ansc","answerc");
cell.appendChild(document.createTextNode(answerRandom[i]));
row.appendChild(cell);
container.appendChild(row);
}
}
}
}
</script>
</head>
<body>
<table>
<thead>
<tr>
<td>Item no.</td>
<td>Question</td>
</tr>
</thead>
<tbody id="results">
</tbody>
</table>
</div>
</div>
</body>
</html>
Welcome to the bulix.org / pastebin. Please don't use this pastebin for illegal purposes, defamation or kitten-squashing.
This pastebin is written using PHP and MySQL and relies on Alex Gorbatchev's syntax hhighlighter (JavaScript based). To avoid spam, you will be required to complete a small mathematical challenge when adding a new paste.
New! Try the pastebin command-line tool: paste.py (requires Python and python-beautifulsoup).
Powered by the Bulix.org Code Pastebin, by Maxime Petazzoni. View pastebin statistics.