Well, yes, sorry about the confusion.
It is Javascript of course.
The tags say [quote]<script language="JavaScript">[/quote].
Just to see if it would help, or ring any bells, here is the code for the entire page (a whole, but short quiz with 5 questions):
[quote]<HTML>
<HEAD>
<TITLE>Vlaanderen</TITLE>
<META NAME="Generator" CONTENT="SolidSoftware's KwizMaker v1.0 ©2002">
<META NAME="Author" CONTENT="">
<script language="JavaScript" src="clock.js">
</script>
<script language="JavaScript">
<!--
document.oncontextmenu=new Function("return false");
function login(){
document.location = "http://www.vlaanderen-flanders.org.uk"; }
var ans = new Array;
var yourtry = new Array;
var thisscore = 0;
var x;
var secsAllowed=15;
var count=5;
var choice=3;
var username;
var email;
ans[1]="A";
ans[2]="C";
ans[3]="B";
ans[4]="C";
ans[5]="C";
for (x=1;x<=count;x++) yourtry[x]="";
function storetry(question, answer){
yourtry[question] = answer;
}
function getscore(){
var y;
thisscore = 0;
setCookie('save', 'false', 365);
for (y=1;y<=count;y++)
{
if (yourtry[y] =="")
{
alert("Please answer ALL questions");
return(false);
}
else if (yourtry[y] == ans[y]) thisscore++;
}
alert("Your Score is: " + Math.round(thisscore/count*100)+"%");
document.quizform.score.value = Math.round(thisscore/count*100)+"%";
document.quizform.name.value = username;
document.quizform.email.value = email;
document.quizform.lapsed.value = lapsedtimestr;
if (thisscore<count)showerrors();
return(true);
}
function showerrors(){
var h;
var v =145+((count-thisscore)*20);
h = "top=0,left=0,width=180,";
h = h + "height=" + v;
h = h + ",scrollbars=1";
var i;
var newwin;
newwin = window.open("", "", h);
newwin.document.write("<FONT size=4><B>Your Error(s)...</B><BR><BR>");
for(i = 1; i<= count;i++){
if (yourtry[i] != ans[i]){
newwin.document.write("\nQuestion: " + i);
newwin.document.write("<BR>");
}
}
newwin.document.write("<BR><B>Have another try...</B><BR><BR></FONT>");
newwin.document.write('<BUTTON onclick="window.close()">Close</BUTTON>');
}
function refresh(){
document.location.reload();
document.quizform.reset();
}
function getCookie(NameOfCookie)
{ if (document.cookie.length > 0)
{ begin = document.cookie.indexOf(NameOfCookie+"=");
if (begin != -1)
{ begin += NameOfCookie.length+1;
end = document.cookie.indexOf(";", begin);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(begin, end)); }
}
return null;
}
function savequiz(){
setCookie('quizuser',document.quizform.name.value,365);
setCookie('QuizID',document.quizform.ID.value,365);
setCookie('save', 'true', 365);
for (x=1; x<=count;x++) setCookie('q'+x, yourtry[x], 365);
}
function setCookie(NameOfCookie, value, expiredays){
var ExpireDate = new Date ();
ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
document.cookie = NameOfCookie + "=" + escape(value) +
((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}
function docookies(){
var con;
username=getCookie('username');
email=getCookie('email');
if (username==null) {
alert('Please log in');
window.location = "http://www.vlaanderen-flanders.org.uk";
}
else {
document.quizform.name.value = username;
if ((getCookie('QuizID') == document.quizform.ID.value) && (getCookie('save')== 'true') && (getCookie('quizuser') == document.quizform.name.value))
{
con = confirm('Saved quiz found. OK to continue, Cancel to restart.');
if (con) getsave();
}
}
}
function getsave() {
var c;
var found = false;
var y = 0;
var ch = 0;
for(x=1; x<=count;x++) {
found = false;
c = getCookie('q'+x);
yourtry[x] = c;
while(found ==false){
if ((document.quizform.elements[y].value == c) && (document.quizform.elements[y].type == "radio"))
{
document.quizform.elements[y].checked = true;
found = true;
}
y=y+1;
ch=ch+1;
}
y = y + choice-ch;
ch=0;
}
}
//-->
</SCRIPT>
</HEAD>
<BODY onload="docookies();startclock(); checkLocation()" onUnload="refresh()" BGCOLOR="#FFFFFF" TEXT="#FFFFFF" BGPROPERTIES="fixed" >
<DIV ID="object1"
STYLE="position:relative; visibility:show;
left:85%; top:0px; z-index:2">
<TABLE BORDER="4" BGCOLOR="#000000" CELLPADDING="0" CELLSPACING="0">
<TR><TD VALIGN="top" ALIGN="left" ><img src="0fdg.gif" name=min ><img src="0fdg.gif" name=minu><img src="cfdg.gif" name=gap ><img src="0fdg.gif" name=sec ><img src="0fdg.gif" name=secu ></TD></TR>
</TABLE>
</DIV>
<H1 ALIGN=CENTER>
<FONT FACE="sans-serif" SIZE="6" COLOR="#000000">
Vlaanderen
</FONT>
</H1>
<HR>
<FORM NAME=quizform method="POST" action="http://www.vlaanderen-flanders.org.uk/quiz/results.php" onSubmit="return getscore()">
<P align="LEFT">
<FONT FACE="serif" SIZE="3" COLOR="#FFFFFF">
<B> Question 1: Wie was eerste minister in 1978?</B><BR><BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
a: <input type=radio value=A name=q1 onclick="storetry(1, this.value)">Wilfried Martens<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
b: <input type=radio value=B name=q1 onclick="storetry(1, this.value)">Hugo Schiltz<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
c: <input type=radio value=C name=q1 onclick="storetry(1, this.value)">Leo Tindemans<BR>
</FONT>
<BR><BR><HR width="50%"><BR>
</p>
<P align="LEFT">
<FONT FACE="serif" SIZE="3" COLOR="#FFFFFF">
<B> Question 2: Wat is de echte naam van 'Madame Non'?</B><BR><BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
a: <input type=radio value=A name=q2 onclick="storetry(2, this.value)">Noella Millequet<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
b: <input type=radio value=B name=q2 onclick="storetry(2, this.value)">Joelle Milliquet<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
c: <input type=radio value=C name=q2 onclick="storetry(2, this.value)">Joelle Milquet<BR>
</FONT>
<BR><BR><HR width="50%"><BR>
</p>
<P align="LEFT">
<FONT FACE="serif" SIZE="3" COLOR="#FFFFFF">
<B> Question 3: Wie is de onlangs mislukte formateur?</B><BR><BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
a: <input type=radio value=A name=q3 onclick="storetry(3, this.value)">Didier Reynders<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
b: <input type=radio value=B name=q3 onclick="storetry(3, this.value)">Yves Leterme<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
c: <input type=radio value=C name=q3 onclick="storetry(3, this.value)">Olivier Maingain<BR>
</FONT>
<BR><BR><HR width="50%"><BR>
</p>
<P align="LEFT">
<FONT FACE="serif" SIZE="3" COLOR="#FFFFFF">
<B> Question 4: Wanneer was de Guldensporenslag?</B><BR><BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
a: <input type=radio value=A name=q4 onclick="storetry(4, this.value)">11/8/1300<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
b: <input type=radio value=B name=q4 onclick="storetry(4, this.value)">11/7/1305<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
c: <input type=radio value=C name=q4 onclick="storetry(4, this.value)">11/7/1302<BR>
</FONT>
<BR><BR><HR width="50%"><BR>
</p>
<P align="LEFT">
<FONT FACE="serif" SIZE="3" COLOR="#FFFFFF">
<B> Question 5: Wanneer werd de Gentse universiteit vervlaamst?</B><BR><BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
a: <input type=radio value=A name=q5 onclick="storetry(5, this.value)">1900<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
b: <input type=radio value=B name=q5 onclick="storetry(5, this.value)">1940<BR>
</FONT>
<FONT FACE="monospace" SIZE="3" COLOR="#FFFFFF">
c: <input type=radio value=C name=q5 onclick="storetry(5, this.value)">1930<BR>
</FONT>
<BR><BR>
</p>
<HR>
<BR>
<FONT size=+1>If you are not
<A NAME="stayput"></A>
<input type=text size=30 value="" name="name"> please click <A HREF="#stayput" onClick="login()">here</A>.<BR><BR></Font>
<FONT size=+1>Your Score: <font>
<input type=hidden name="email" value="">
<input type=hidden name="URL" value="http://www.vlaanderen-flanders.org.uk/dank.htm">
<input type=hidden name=ID value=Nr.1>
<input type=hidden name="lapsed" value="">
<input type=text size=5 value="N/A" name=score><BR><BR>
<input type=submit value="Check Score" >
<input type=reset value=Clear All onClick="refresh()">
<input type=button value=" Close This Window " onclick="self.close()">
</FORM>
<HR>
</BODY>
</HTML>[/quote]
Hope that helps.
Edited by mrdee, 03 December 2007 - 06:28 PM.