Apparently this code only works on the first row labelled hideme. how can i get it to work on every row that has hide me in it? I'm building out a complex listing and will need multiple rows hidden, so separate lines for each row may not work (i.e.
{
document.getElementById("hideme1").style.display = value;
document.getElementById("hideme2").style.display = value;
document.getElementById("hideme3").style.display = value;
document.getElementById("hideme4").style.display = value;
etc. will not do
}
Little help? Thanks!!
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-...401-19991224/loose.dtd">
<HTML>
<HEAD>
<script type="text/javascript">
function applyDisplay(value)
{
document.getElementById("hideme").style.display = value;
}
</script>
<TITLE>Blank HTML 4 Transitional Page</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>
<TABLE BORDER=1>
<TR>
<TD>1</TD><TD>Lorem</TD><TD>Ipsum</TD><TD>dolor</TD><TD>sit</TD>
</TR>
<TR id="hideme">
<TD>2</TD><TD>consectetuer</TD><TD>adipiscing</TD><TD>elit.</TD><TD>Aliquam</TD>
</TR>
<TR id="hideme">
<TD>3</TD><TD>egestas</TD><TD>scelerisque</TD> <TD>ipsum</TD><TD>Donec</TD>
</TR>
<TR>
<TD>4</TD><TD>et</TD><TD>erat</TD><TD>id</TD><TD>massa</TD>
</TR>
</TABLE>
<a href="#" onclick="applyDisplay('none'); return false;">HIDE ROWS</a><br><a href="#" onclick="applyDisplay(''); return false;">SHOW ROWS</a>
</BODY>
</HTML>
{
document.getElementById("hideme1").style.display = value;
document.getElementById("hideme2").style.display = value;
document.getElementById("hideme3").style.display = value;
document.getElementById("hideme4").style.display = value;
etc. will not do
}
Little help? Thanks!!
<!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-...401-19991224/loose.dtd">
<HTML>
<HEAD>
<script type="text/javascript">
function applyDisplay(value)
{
document.getElementById("hideme").style.display = value;
}
</script>
<TITLE>Blank HTML 4 Transitional Page</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
</HEAD>
<BODY>
<TABLE BORDER=1>
<TR>
<TD>1</TD><TD>Lorem</TD><TD>Ipsum</TD><TD>dolor</TD><TD>sit</TD>
</TR>
<TR id="hideme">
<TD>2</TD><TD>consectetuer</TD><TD>adipiscing</TD><TD>elit.</TD><TD>Aliquam</TD>
</TR>
<TR id="hideme">
<TD>3</TD><TD>egestas</TD><TD>scelerisque</TD> <TD>ipsum</TD><TD>Donec</TD>
</TR>
<TR>
<TD>4</TD><TD>et</TD><TD>erat</TD><TD>id</TD><TD>massa</TD>
</TR>
</TABLE>
<a href="#" onclick="applyDisplay('none'); return false;">HIDE ROWS</a><br><a href="#" onclick="applyDisplay(''); return false;">SHOW ROWS</a>
</BODY>
</HTML>
