<HTML> <HEAD> <TITLE>validate
<Script language = JavaScript>
function validate(theForm) {
var why="";
why += checkDropdown(theForm.choose.selectedIndex);
why += checkRadio(theForm.radios);
if (why != "") { alert(why); return false; } return true; }
function checkDropdown(choice) { var error = ""; if (choice == 0) { error = "You didn't choose an option from the drop-down list.\n"; } return error; }
function checkRadio(checkvalue) { var error = "";
for (i=0, n=theForm.radios.length; i if (!(checkvalue)) {
error = "Please check a radio button.\n";
}
return error;
}
<BODY>