Hello everyone.
I've downloaded a quiz-JavaScript from
http://www.javascriptkit.com/script/cut180.shtml - but I really want to make a little improvement, unfortually I'dont have any programmings skills at all, so it could be very nice to get some help from a smart person.
Here we go.
My wish is to add a countdown into the quiz, Ive found following countdown-script on an other site.
Code.
<script type="text/javascript" language="javascript">
var iMinutes=0;
var iSeconds=30;
var sRedirect="results.htm";
function CountDown(){
if(iSeconds==0){
iMinutes--;
iSeconds=59;
}else{
iSeconds--;
if(iMinutes==0&&iSeconds==0)window.location.href=sRedirect
}
document.getElementById("countdown").firstChild.nodeValue=iMinutes+":"+iSeconds
}
window.onload=function(){window.setInterval("CountDown()",1000)}
</script>
</head>
<body>
<div id="countdown"> </div>
There are two main problems I looking forward to get solved.
1)
When the time is up, is just redirect the user to
http://www.yalla.dk/2706/results.htm without to calculate the score, and that is not funny.
2)
The countdown is on the top of my site
http://www.yalla.dk/2706/popquiz.htm I'dont like this because I want to have my guests can watch the time they have left constantly without to scroll up and down to watch the countdown. I wish to place the counter in the browser windows left side, hope you understand what I mean.