Hey there, I'm new to HTML and I've been trying to achieve something below. Unfortunately, it's crashing and I can't figure out if it's just a syntax error or if what I'm attempting isn't possible.
The function declaration:
<!-- Copyright 2005, Sandeep Gangadharan -->
<!-- For more free scripts go to http://www.sivamdesign.com/scripts/ -->
if (document.getElementById) {
document.writeln('<style type="text/css"><!--')
document.writeln('.texter {display:none} @media print {.texter {display:block;}}')
document.writeln('//--></style>') }
function close(theID) {
if (document.getElementById(theID).style.display == "block") { document.getElementById(theID).style.display = "none" } }
function open(theID) {
if (document.getElementById(theID).style.display == "block") { document.getElementById(theID).style.display = "none" }
else { document.getElementById(theID).style.display = "block" } }
// -->
</script>
</head>
How to use the function:
<table>
<tbody>
<tr>
<td colspan="2" rowspan="0">
<div>• <a href="/tallwalls/" target="_blank"><b>Tall Walls Sizer</b></a></div>
<p onClick="open('a4'), close('a1','a2','a3')" style="cursor:hand; cursor:pointer">
<span style="color: #808080;">[Click here for more information]</span></p>
</td>
</tr>
<tr id="a4" class="texter">
<td style="padding:0px;width:210px;"><a href="/tallwalls/" target="_blank" title="Tall Walls Sizer"><img src="/images/logos/tallWALLS.gif" alt="" width="206" height="41"/></a></td>
<td>
<div>DESCRIPTION</div>
</td>
</tr>
</tbody>
</table>
I'm not entirely sure about the onClick="open('a4'), close('a1','a2','a3')". Is this correct?
EDIT: Just to add that the other ids do follow the same pattern as well - x4
Thanks in advance,
SirKaydian