Guest Miven Posted June 7, 2014 Posted June 7, 2014 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... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.