I've got a section of text (currently within a layer) that I want hiding until a link is selected. I've used the show/hide div function before but it doesn't seem to be working within a layer.</p> Any ideas?</p> Code I'm using is: <a href="http://www.barnsleyfc.org.uk/bbs/forums/thread-post.asp#" onClick="showhide(paygphonedd)"> <div class="style1" id="paygphonedd" style="display=none"> <p>TEST</p> <p></p></div></p> What do I need to include so it's hidden until selected?</p> TIA.</p>
Style properties are defined using colon not equals so </p> style="display=none" </p> should be</p> style="display:none" </p> Showhide is not a standard javascript function, but assuming its something that is included this should work if you quote the div id. You should also return false from the onclick so it doesn't try opening the #link. So something like:</p> <a xhref="http://www.barnsleyfc.org.uk/bbs/forums/thread-post.asp#" onclick="showhide('paygphonedd');return false">link test</a> </p> </p>
The bbs has munged that, it should just be href not xhref, and it automatically added the barnsleyfc.org.uk link, when it should just be #
Reight - this is getting on my tits now. The code I've got now is: span class="style95" 'a href="#" onclick="showhide('paygphonedd');return false"' div class="style77" id="paygphonedd">TEST</div It's showing the Div tag fine & the show/hide seems to be working, however, the tag section is showing permanently so no point having show/hide. I need it to be hidden until selected. Help!?!?!!?!
I am sure exactly what you are trying to do. But showhide will presumably show the target element if its currently hidden, and hide it if its currently visible? Do you want the link to disappear after you have clicked to see the div? If so then you need to call showhide twice. Once to show the div, and once to hide the link. The div cannot be inside the link and vice versa, because when you hide the link, you are also hiding the div. </p> If this isn't what you are wanting, then send me a link or summat, cos I don't understand what you are trying to do. </p>