<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!--
function color(changecolor, bg) {
if (changecolor.style) changecolor.style.backgroundColor = bg;
}
function Input(form) {
var bg1 = "#ccc000";
var bg2 = "white";
var valid = true;
if (form.first.value == "") {
valid = false;
color(form.first, bg1);
} else {
color(form.first, bg2);
}
if (form.last.value == "") {
valid = false;
color(form.last, bg1);
} else {
color(form.last, bg2);
}
if (!valid) alert("Please fill the form out.");
return valid;
}
// -->
</SCRIPT>
<body bgcolor="#000000" text="bda94c">
<FORM onSubmit="return Input(this)">
<table border="0">
<tr>
<td valign="top">
<p><font size="2" face="Arial, Tahoma, Verdana">Validates the First and
Last name. <br>
<i>In IE, the textbox color changes to indicate field is blank, as well
as a alert pops up. <br>
In NS, a alert pops up.</i></font></p>
<p> </p>
</td>
</tr>
<tr>
<td>First name:
<input type="text" name="first" size="20" value="">
</td>
</tr>
<tr>
<td>Last name:
<input type="text" name="last" size="20" value="">
</td>
</tr>
<tr>
<td>
<input type="submit" value="send" name="submit">
</td>
</tr>
</table>
</FORM>
</BODY>
</HTML>