I have been racking my brain out trying to get this to work... (I am
new to javascript)...
Below is what I am trying to accomplish. I want to have the areas with
+txt+ to have the user defined variable inserted. I can't seem to get
it to work.
<html><head>
<script type="text/javascript">
function color(txt)
{
var check = document.formx. i+txt+.value;
if (check=='') {
d+txt+.style.ba ckground='#ffff ff';
}
else {
d+txt+.style.ba ckground='#c0c0 c0';
}
}
</script>
</head><body>
<div id="dv1">
Name of vendor: <input type=text name=iv2 disabled
onkeyup="color( v1)"><BR>
</div>
<div id="dv2">
Name of agent: <input type=text name=iv2 disabled
onkeyup="color( v2)"><BR>
</div>
new to javascript)...
Below is what I am trying to accomplish. I want to have the areas with
+txt+ to have the user defined variable inserted. I can't seem to get
it to work.
<html><head>
<script type="text/javascript">
function color(txt)
{
var check = document.formx. i+txt+.value;
if (check=='') {
d+txt+.style.ba ckground='#ffff ff';
}
else {
d+txt+.style.ba ckground='#c0c0 c0';
}
}
</script>
</head><body>
<div id="dv1">
Name of vendor: <input type=text name=iv2 disabled
onkeyup="color( v1)"><BR>
</div>
<div id="dv2">
Name of agent: <input type=text name=iv2 disabled
onkeyup="color( v2)"><BR>
</div>
Comment