Jump to content

extended text help needed


abemaca

Recommended Posts

first ide like to say sorry if i posted this in the wrong place.

 

<SCRIPT language="JavaScript">
<!--
function showLayer(name) {
name.style.visibility = "visible";
}

function hideLayer(name) {
name.style.visibility = "hidden";
}
// -->
</SCRIPT>

Example click <span onclick="showLayer(thisone)" style="cursor:hand"><b>here</b></span><br>
<DIV id="thisone" style="position: top:100; left:10; absolute; visibility:hidden">Some text or other stuff
<br><a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(thisone)">[ hide ]</a>
</DIV>
<p>

Example click <span onclick="showLayer(1thisone)" style="cursor:hand"><b>here</b></span><br>
<DIV id="1thisone" style="position: absolute; visibility:hidden">Some text or other stuff
<br><a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(1thisone)">[ hide ]</a>
</DIV>
<p>

 

this is my code that works fine. my issue is i want to click it and the hidden text then pushes the text below already on show down the page , if you run the code above youll see the 1st hidden message opens over the top of the next line down where as i want it to push the text below it.

 

hope i make sense lol

Link to comment
https://forums.phpfreaks.com/topic/258390-extended-text-help-needed/
Share on other sites

simple substitution:

<script type="text/javascript">
function showLayer(name)
{
name.style.display = "block";
}

function hideLayer(name)
{
name.style.display = "none";
}
</script>

Example click <span onclick="showLayer(thisone)" style="cursor:hand"><b>here</b></span><br>
<div id="thisone" style="position: top:100; left:10; absolute;display:none;">
Some text or other stuff
<br>
<a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(thisone)">[ hide ]
</a>
</div>
<p>

Example click <span onclick="showLayer(sone)" style="cursor:hand"><b>here</b></span><br>
<div id="sone" style="position: absolute; display:none;">Some text or other stuff
<br><a href="#null" style="cursor:hand" style="text-decoration:none;" onclick="hideLayer(sone)">[ hide ]</a>
</div>
<p>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.