What you mean it doesnt work? It works in IE. Hope you joined those "java script" to "javascript" because those dont show correctly when posting here...
Anyway for javascript forum, I recommend www.devshed.com.
I found there a script for your needs. This should work a bit better. I modified it a little bit:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script>
function disable(el,lol)
{
if (document.getElementById(lol).value) {
document.getElementById(el).disabled = true;
document.getElementById(el).style.backgroundColor = 'red';
}
else {
document.getElementById(el).disabled = false;
document.getElementById(el).style.backgroundColor = '';
}
}
</script>
</head>
<body>
<form name="form1" id="form1" method="post" action="">
<p>
<input type="text" name="myTextBox1" id="myTextBox1" onBlur="disable('myTextBox2','myTextBox1')" />
</p>
<p>
<input type="text" name="myTextBox2" id="myTextBox2" onBlur="disable('myTextBox1','myTextBox2')" />
</p>
</form>
</body>
</html>