Hey, i get an error showHide not defined but it is, please help me figure out wats wrong.
[code=php]
<link href=”/common/default.css” rel=”stylesheet” type=”text/css” />
<style type=”text/css”>
h2 {
color:navy;
font-family: Tahoma;
font-size:12px;
};
h3 {
color:black;
font-family: Tahoma;
font-size:12px;
};
h4 {
color:navy;
font-family: Tahoma;
font-size:14px;
};
h1 {
font-family: Tahoma;
font-size: 12px;
line-height: 12px;
} ;
table {
border-color: #000000;
border-spacing: 0px;
border-style: solid;
border-width: 2px;
cell-spacing: 0px;
width : 100%;
}
table.subtable {
border-color: #000000;
border-spacing: 0px;
border-style: solid;
border-width: 2px;
cell-spacing: 0px;
}
td, th {
font-family: Tahoma;
font-size: 10pt;
padding: 2px 0.5em;
white-space: nowrap;
}
td.dtnum {
text-align: right;
}
td.dtdate {
text-align : left;
}
td.clicktd {
color : navy;
}
th {
background-color: yellow;
}
th a {
color: #000080;
text-decoration: none;
}
th a:visited {
color: #000080;
}
th a:active, th a:hover {
color: #800000;
text-decoration: underline;
}
tr.alternateRow {
background-color: #e0e0e0;
}
td.sortedColumn {
background-color: #f0f0f0;
}
th.sortedColumn {
background-color: #b0b0b0;
}
tr.alternateRow td.sortedColumn {
background-color: #d0d0d0;
}
</style>
<script language=”JavaScript” type =”text/javascript”>
<!–
function showHide(row)
{
if(navigator.appName == “Microsoft Internet Explorer”)
{
row = getNextSiblingRow(row);
if(!row) return;
var className = row.className;
do{
row.style.display = (row.style.display == ‘none’) ? ‘block’ : ‘none’;
row = getNextSiblingRow(row);
}while(row && row.className == className)
}
else
{
var classCompare = row.className;
row = getNextSiblingRow(row);
if(!row) return;
var className = row.className;
do{
row.style.display = (row.style.display == ‘none’) ? ‘table-row’ : ‘none’;
row = getNextSiblingRow(row);
}while(row && row.className <> classCompare)
}
}
function getNextSiblingRow(row)
{
var result = null;
var candidat = row.nextSibling;
while(candidat)
{
if(candidat.tagName && candidat.tagName.toUpperCase() == ‘TR’){
result = candidat;
break;
}
candidat = candidat.nextSibling;
}
return result;
}
//–>
</script>
<HTML>
<TITLE>
Member – Transactions and Transaction Details
</TITLE>
<h2>
Member – Transactions and Transaction Details
</h2>
<hr size=”1″ color=”#000000″>
<BODY>
<TABLE width = ‘100%’ >
<TR>
<TD>M_UNIQUE</TD>
<TD>M_NAME</TD>
<TD>TRX_UNIQUE</TD>
<TD>TRX_I_PRICE_EX_VAT</TD>
<TD>TRXD_UNIQUE</TD>
<TD>TRXD_PLU_DESCRIPTION</TD>
<TD>TRXD_PLU_PRICE_EX_VAT</TD>
</TR>
<TR onClick=”showHide(this)” style=”cursor:hand; cursor:pointer;” class=”0″>
<TD>12</TD><TD>Pamela</TD>
<td> </td><td> </td><td> </td><td> </td><td> </td>
</TR>
<TR onClick=”showHide(this)” style=”cursor:hand; cursor:pointer;” class=”2″ style=”display:none;”>
<TD colspan = ‘2’> </TD>
<TD>4</TD><TD>6106</TD>
<td> </td><td> </td><td> </td>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>66</TD><TD>PURITY 3 CEREAL 200G STRAW</TD><TD>513</TD>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>67</TD><TD>PANADO PAED SYRUP STRAWBERRY</TD><TD>1403</TD>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>68</TD><TD>PURITY 2 125ML SWEET POTA</TD><TD>341</TD>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>69</TD><TD>PURITY 2 125ML SWEET POTA</TD><TD>341</TD>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>70</TD><TD>ADCO DOL TABS 100’S</TD><TD>3508</TD>
</TR>
<TR class=”4″ style=”display:none;”>
<TD colspan = ‘4’> </TD>
<TD>71</TD><TD>REDEMPTION</TD><TD>-2112</TD>
</TR>
</TABLE>
</BODY>
</HTML>
what the function do is to when you click on a row is compares the rows that folow with the clicked row class and hides it if its not the same.