Dynaminc Blotter Highlighter (Rated 5)Description:
hightlight a single tr element Code starts here
<html>
<head>
<script language="javascript">
var iOriginalBackGround=null;
function feedIn(cell){
var feedRow = document.getElementById(cell);
feedRow.style.fontStyle= "italic";
var feedData = feedRow.getElementsByTagName("td");
iOriginalBackGround = feedData[0].style.backgroundColor;
for (var i=0; i < feedData.length; i++){
feedData[i].style.backgroundColor = "#ddd";
}
}
function feedOut(cell){
var feedRow = document.getElementById(cell);
feedRow.style.fontStyle= "normal";
var feedData = feedRow.getElementsByTagName("td");
for (var i=0; i < feedData.length; i++) {
feedData[i].style.backgroundColor = iOriginalBackGround;
}
}
</script>
</head>
<body>
<table>
<tr id="<%=feedId%>" onMouseover="Javascript: feedIn('<%=feedId%>')" onMouseout="Javascript: feedOut('<%=feedId%>')">
<td>hello</td>
<td>there</td>
<td>stephen</td>
</tr>
</table>
</body>
</html>
Submitted by bakera on 14-08-2003 11:41 |