[SOLVED] Hand-hacking html - it's been years and I'm rusty...

  • Thread starter Thread starter Miven
  • Start date Start date
M

Miven

I'm trying to set a variable to an initial OFF/FALSE state. By default it starts as ON/TRUE.

Here's the simplified code:
Code:
<table>
<tr>
<td valign=bottom>
<img align="right"
id=dictionarybox_img_toggle
src="file://localhost/var/www/icons/b-up2.gif"
style="cursor:hand;cursor:pointer"
onclick="var s=document.getElementById('dictionarybox_source').style;
this.src='file://localhost/var/www/icons/b-'+(s.display?'up2.gif':'down2.gif');
s.display=(s.display?'':'none')"/>
</td>
<td align="left" valign=bottom>More:</td>
</tr>
<tr id="dictionarybox_source">
<td align=right valign=top>Source:</td>
<BLAH BLAH BLAH>
</tr>
</table>
So, if you click on the little image, it toggles the display of the table row id "dictionarybox_source". I'd like it to *not* show "dictionarybox_source" initially. For the life of me I cannot recall how to do this type of thing. I think it's one little javascript line.

Anybody still hand-hack html?

Continue reading...
 
Back
Top