rjusa
11-26-2003, 12:39 AM
The following routine changes the 2nd textboxes color depending on the entry in the 1st textbox. It works just fine in IE but not in Netscape. Any suggestions?
<script language="JavaScript">
function validate() {
if (document.Form1.name1.value.length > 0)
document.Form1.int.style.background = '#0000ff';
}
</script>
</head>
<body>
<form name="Form1" method="post" action="">
<input type="text" name="name1" size="20">Name1
<input type="text" name="int" size="20">Initials
</form>
<input type="button" value="change" name="B1" onclick="validate()"></p>
Thanks,
Ron
<script language="JavaScript">
function validate() {
if (document.Form1.name1.value.length > 0)
document.Form1.int.style.background = '#0000ff';
}
</script>
</head>
<body>
<form name="Form1" method="post" action="">
<input type="text" name="name1" size="20">Name1
<input type="text" name="int" size="20">Initials
</form>
<input type="button" value="change" name="B1" onclick="validate()"></p>
Thanks,
Ron