Jump to content

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


Recommended Posts

Guest Miven
Posted

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...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...