Multiple choice  
 
This is a collection of scripts that may be used for building interactive courseware. You can use the scripts for free. However, we would apreciate some acknowledgements.  
Multiple choice  
by radiobuttons and pop-windows that tell if the answer is right or wrong.
What's that?  

 What is the grain-size of the clay fraction? 
0.2 µm 2 µm 20 µm 2 nm! 

Better examples are here.
The source (please avoid line breaks in individual script lines) 

<HTML> 
<HEAD> 
 <TITLE>Multiple choice</TITLE> 
<SCRIPT LANGUAGE="JavaScript"> 
<!-- hide this script tag's contents from old browsers> 
     vshort=2000; 
     medium=4000; 
     vlong=6000; 
     wrong="<font size=+3 color=ff0000><b>Sorry, that's wrong!</b></font><hr>Please don't guess!</font><br>"; 
     right="<font size=+3 color=00AA00><b>Right!</b></font><hr>Clays have grain-sizes less 2 µm.</font>"; 

function popup(msg, delay) { 
        var x=0;
        myWin= open("","BF","width=250,height=200,status=no,toolbar=no,menubar=no,scrollbars=yes,resizable=yes"); 
        while(myWin.document == null){x++};
       myWin.document.open();
       myWin.document.write("<html><head><title>Message"); 
       myWin.document.write("</title></head><body bgcolor=eeeeee onLoad='cd()'>"); 
       myWin.document.write("<center>"); 
       myWin.document.write(msg+" <p><form><input type=button value=Close onClick=closeIt()></form>"); 
       myWin.document.write("<SCRIPT LANGUAGE='JavaScript'>function closeIt() {close();}function cd(){huhu = setTimeout('closeIt()'," + delay+");}</script>"); 
       myWin.document.write("</body></html>"); 
       myWin.document.close();  
} 

<!-- done hiding from old browsers --> 
</SCRIPT> 
</HEAD> 

<BODY> 
............ your html here 
<FORM><B><FONT FACE="helvetica">What's that?&nbsp;</FONT></B><p> 
<b>What is the grain-size of the clay fraction?</b><br> 
<INPUT type=radio name=f5 value=100 onClick=popup(wrong,vshort) checked> 0.2 µm 
<INPUT type=radio name=f5 value=100 onClick=popup(right,medium)> 2 µm 
<INPUT type=radio name=f5 value=100 onClick=popup(wrong,vshort)> 20 µm 
<INPUT type=radio name=f5 value=100 onClick=popup(wrong,vshort)> 2 nm! 
<p> 
</FORM> 
............ your html here 

</body> 
</html>

 

Stefan Krumm   
Institut für Geologie, Schloßgarten 5, 91054 Erlangen  
krumm@geol.uni-erlangen.de