logo
Ryan's Webpage
 

Size Chooser

Which size would you like?

Small Medium
Large Jumbo

<html>
<head>
<script>
function processSize(){
// by Ryan Te
// 10/30/07
// demonstrates radio buttons

var size;
var i;
var theOption;

for (i = 0; i <= 3; i++){
theOption = document.myForm.radSize[i];
if (theOption.checked == true){
size = theOption.value;
} // end if
} // end for loop

document.myForm.txtOutput.value = "OK, I'll get you the ";
document.myForm.txtOutput.value += size + " one.";
} // end function
</script>
</head>
<body>
<center>
<h1>Size Chooser<hr></h1>
<form name = myForm>
<h3>Which size would you like?</h3>
<table border = 0>

<tr>
<td>
<input type = "radio"
name = radSize
value = "small">Small
</td>

 

<td>
<input type = "radio"
name = radSize
value = "medium">Medium
</td>
</tr>

<tr>
<td>
<input type = "radio"
name = radSize
value = "large">Large
</td>

 

<td>
<input type = "radio"
name = radSize
value = "jumbo">Jumbo
</td>
</tr>

<tr>
<td colspan = 2>
<center>
<input type = "button"
value = "OK"
onClick = "processSize()">
</center>
</td>
</tr>
</table>
<textarea name = "txtOutput"
rows = 5
cols = 40>

</textarea>

</form>
</center>
<hr>
</body>
</html>

 

 

Contact Me

 

Mr. Styner's Webpage

 

Peter

Julie

Nick

Tiddus

Norman