straytoasters Posted April 7, 2007 Share Posted April 7, 2007 I want to change the content in a middle table/cell from links on the same page in another table cell. Essentially I am wanting to write text in the document that is hidden till called upon, and when called upon it is put in the table/cell specified in the link. The “wiki on a stick” project does something very similar. A (not real) code example of what I am looking for is something like this:<table with two columns><collumn1 ID=”navbar”>Link1 <content1 target=”main”>Link2 <content2 target=”main”>Link3 <content3 target=”main”></column1><column2 ID=”main”>Default text (probably link 1)</column2></table><hidden data><content1>Lots of text</content1><content2>Lots of more text</content2><content3>Still more text</content3></hidden data>I realize this will probably at least involve JavaScript (I can fathom a pure html way of accomplishing this), and yes, I am trying to avoid an iframe. I have read something about writing to layers, but it wasn’t terribly clear. Any thoughts/suggestions?Straytoasters Link to comment Share on other sites More sharing options...
ripken204 Posted April 8, 2007 Share Posted April 8, 2007 (edited) well you can do <span id="hide1" style="Visibility:hidden"> hidden crap </span><script language="javascript">function unhide() { hide1.style.visibility = "visible"; } function hide() { hide1.style.visibility = "hidden"; } </script> Edited April 8, 2007 by ripken204 Link to comment Share on other sites More sharing options...
phkninja Posted April 13, 2007 Share Posted April 13, 2007 (edited) just and adoptaion to the above<script language="javascript">function unhide(id){identity=document.getElementById(id);identity.style.visibility = "visible";}}function hide(id){identity=document.getElementById(id);identity.style.visibility = "hidden";}</script> <a href="" onclick="unhide('hide1');">Unhide topic 1</a>........<span id="hide1" style="Visibility:hidden"> hidden crap </span>....... Edited April 13, 2007 by phkninja Link to comment Share on other sites More sharing options...
ripken204 Posted April 15, 2007 Share Posted April 15, 2007 (edited) good adaptation Edited April 15, 2007 by ripken204 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now