K
KathyB
Hi, I'm trying to get the following script to work, but I'm getting an
error saying "rowID is undefined".
function showhide(rowId) {
var showRow = "Edit_" + rowID
var hideRow = "View_" + rowID
document.getElementById(showRow).style.display ="block";
document.getElementById(hideRow).style.display = "none";
}
I'm building the html using an xsl stylesheet, so I'm passing a
dynamic name attribute as the rowID parameter. When I look at the HTML
source, it looks fine. Please tell me where I'm going wrong...I'm sure
it's simple, just not to me! Thanks, Kathy
Here is a sample of the row source:
<tr id="View_Label" bgcolor="red" valign="middle"
style="display:block">
<td width="70%"><h3>1. Label</h3></td>
<td width="30%">
<input type="button" name="Edit" value="Edit"
onclick="showhide('Label')"></td>
</tr>
....then another row with ="Edit_Label" is used for the input boxes,
etc.
error saying "rowID is undefined".
function showhide(rowId) {
var showRow = "Edit_" + rowID
var hideRow = "View_" + rowID
document.getElementById(showRow).style.display ="block";
document.getElementById(hideRow).style.display = "none";
}
I'm building the html using an xsl stylesheet, so I'm passing a
dynamic name attribute as the rowID parameter. When I look at the HTML
source, it looks fine. Please tell me where I'm going wrong...I'm sure
it's simple, just not to me! Thanks, Kathy
Here is a sample of the row source:
<tr id="View_Label" bgcolor="red" valign="middle"
style="display:block">
<td width="70%"><h3>1. Label</h3></td>
<td width="30%">
<input type="button" name="Edit" value="Edit"
onclick="showhide('Label')"></td>
</tr>
....then another row with ="Edit_Label" is used for the input boxes,
etc.