I have this javascript code:
And this html:Code:<script type="text/javascript"> function disp() { n = document.getElementById('btwo'); n.style.display=n.style.display=='block'?'none':'block'; } </script>
The bit in the blockquote is initially hidden, then when you click the link ("Topic: Two"), it shows the hidden bit (..toggles display style).Code:<tr id="two"> <td><a href="javascript:void(0)" class="clink" onclick="disp()">Topic: Two</a> <blockquote id="btwo" class="DisplayNone">Some bumf about this topic</blockquote> </td> </tr>
I need to un-hardcode the 'btwo' in the script part...
I tried using onclick="disp(this)" , but my knowledge of the DOM tree is pitiful...
Any help / hints appreciated.
Thanks




Reply With Quote