LyndonOHRC
Programmer
I'm trying to change the background color of of a row that has column heading data for the rows below if data is changed in one of the input fields.
I have a second row with form fields in it and I have the ChangeParent function in the onchange event of some of the input fields. I'm trying to pass the id of the first row and can't seem to get the background color to change.
I hope I'm close, by reading similar posts, but can't get it to work...
Thanks
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey
I have a second row with form fields in it and I have the ChangeParent function in the onchange event of some of the input fields. I'm trying to pass the id of the first row and can't seem to get the background color to change.
I hope I'm close, by reading similar posts, but can't get it to work...
Thanks
Code:
<tr id="Parent1">
<td> column headings.....</td>
</tr>
<tr id="Child1">
<td>
Date:
</td>
<td>
<input type=text name="startdate" size="10" onchange="ChangeParent('Parent1');">
</td>
</tr>
<script language=javascript>
function ChangeParent(trid){
var edited_row_bgcolor = '#FAEBD7';
var elm = document.getElementById(trid);
document.elm.style.background = edited_row_bgcolor;
}
</script>
Lyndon
---People Remember about 10% of what you say ---They never forget how you made them feel. Covey