Hi,
Based on your suggestions, I have the code at the bottom of the page. What I
was hoping I could do, was get rid of the loop in the java-script, by
changing a property of the <table>, rather than that of the <td>s. I was
also hoping I could generate this look with less stylesheet. Is this
possible, or is it best to use the code as show below.
Thanks again,
Martin
--
Martin Eyles
ma**********@NOSPAM.bytronic.com
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="TEST.aspx.vb"
Inherits="LineViewProto.NET.TEST"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>TEST</title>
<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
<meta content="JavaScript" name="vs_defaultClientScript">
<meta content="http://schemas.microsoft.com/intellisense/ie5"
name="vs_targetSchema">
<style>td.ugly{ border:6px solid #F00; background:#000;
border-top:0px; color:#FFF; padding:2px 0px 2px 0px;}
</style>
<script>
function test(){
for (i=1; i<=3; i++){
reference="table2data"+i
var item = document.getElementById(reference)
if (item != null){
item.style.borderColor = '#0FF'; //changes a specific
style
}
}
}
</script>
</head>
<body ms_positioning="GridLayout" onload="test();">
<table id="table1" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="75" class="ugly" style="BORDER-TOP:red 6px
solid">Test</td>
</tr>
<tr>
<td width="75" class="ugly">Test</td>
</tr>
<tr>
<td width="75" class="ugly">Test</td>
</tr>
</table>
<br>
<table id="table2" border="0" cellpadding="0" cellspacing="0">
<tr>
<td id="table2data1" width="75" class="ugly"
style="BORDER-TOP:red 6px solid">Test</td>
</tr>
<tr>
<td id="table2data2" width="75" class="ugly">Test</td>
</tr>
<tr>
<td id="table2data3" width="75" class="ugly">Test</td>
</tr>
</table>
<br>
<table id="table3" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="75" class="ugly" style="BORDER-TOP:red 6px
solid">Test</td>
</tr>
<tr>
<td width="75" class="ugly">Test</td>
</tr>
<tr>
<td width="75" class="ugly">Test</td>
</tr>
</table>
</body>
</html>