<html>
<head>
<script type="text/javascript" language="javascript">
<!-- //
function CheckStatus(){
if (document.MyForm.MyTextField.value==""){
alert("First please enter your name");
document.MyForm.MyTextField.focus();
} else{
document.MyForm.Comments.select();
}
}
// -->
</script>
</head>
<body>
<table>
<form name="MyForm" action="http://www.java2java.com/" method="Post" onsubmit="DisplayValue()">
<tr>
<td><input type="text" name="MyTextField" onblur="ChangeStatus()"/></td>
<td>Enter your name</td>
</tr>
<tr>
<td><textarea name="Comments" rows="6" cols="40" onmouseup="CheckStatus()" >Please enter your name first</textarea></td>
<td>Enter your comments.</td>
</tr>
<tr>
<td><input type="submit" value="Click to Submit"/></td>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
|