<html>
<head>
<title>Abakada HTML Forms Tutorials: INPUT Radio Sample</title>
<link href="../shared/museo.css" rel="stylesheet" type="text/css">
<script language="JavaScript" src="/shared/shared.js"></script>
<script language="JavaScript">
<!--
var check = new Array ( );
check [ 0 ] = "Correct. George Washington was the \nfirst President of the United States of America.";
check [ 1 ] = "Abraham Lincoln came a tad bit later";
check [ 2 ] = "Christopher Columbus was an explorer, \nnot a United States President.";
check [ 3 ] = "Robert Plant was the lead vocalist of Led Zeppelin, \nnot a United States President.";
function chkAnswer ( ) {
for ( var i = 0; i < document.theForm.choices.length; i ++ ) {
if ( document.theForm.choices [ i ].checked ) {
alert ( check [ i ] );
}
}
}
//-->
</script>
</head>
<body>
<!-- #include virtual = "~/shared/top.inc" -->
<div class="header"><h2>Abakada HTML Forms Demo: INPUT Radio Sample</h2></div>
<hr size=1 width=92%>
<p>This example demonstrates the use of the <b>INPUT Radio</b> control to provide a user with a series of choices. </p>
<div class="back" style="background: #246">
<form name=theForm>
<h5>The first president of the United States was: </h5>
<table align="center">
<tbody>
<tr>
<td><label for=oradio1>George Washington</label></td>
<td><input id=oradio1 name=choices type=radio onclick="chkAnswer ( )"></td></tr>
<tr>
<td><label for=oradio2>Abraham Lincoln</label></td>
<td><input id=oradio2 name=choices type=radio onclick="chkAnswer ( )"></td></tr>
<tr>
<td><label for=oradio3>Christopher Columbus</label></td>
<td><input id=oradio3 name=choices type=radio onclick="chkAnswer ( )"></td></tr>
<tr>
<td><label for=oradio4>Robert Plant</label></td>
<td><input id=oradio4 name=choices type=radio onclick="chkAnswer ( )"></td></tr>
</tbody>
</table>
<!-- <p class="small"><input onclick=chkAnswer ( ) type=button value="Check Answer"></p> -->
</form>
</div>
<br>
<hr size=1 width=92%>
<!-- #include virtual="~/shared/viewsrc.inc" -->
</body>
</html>