<html>
<head>
<script type="text/javascript" language="javascript">
<!-- //
function ChangeStatus(){
if (document.MyForm.MyTextField.value!==""){
document.MyForm.Comments.readOnly = false;
document.MyForm.Comments.select();
} else{
document.MyForm.MyTextField.focus();
}
}
// -->
</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>
|