2.0 hide html box but keep text inside?

R.?

New member
How can you hide the html box but keep the text and photos inside?
CODE!?
i meant on myspace on 2.0 myspace how can you hide the html box but keep text inside
 
I am not sure what you mean by html box. I assume you mean "how to hide the content of a <div> tag in HTML without losing it". If so, try the following code. Cut it and paste in an HTML page. I tried it with IE8 and FireFox 3.6:

<html>
<head>
<title>Hiding a div</title>
<script type="text/javascript">
function ToggleHideShow ()
{
var display = document.getElementById ("displayDiv");
var button = document.getElementById ("toggleButton");

// alert (display.style.display + "\n" + typeof (display.style.display));

if(display.style.display == "block")
{
display.style.display = "none";
button.value = "Show";
}
else
{
display.style.display = "block";
button.value = "Hide";
}
}
</script>
</head>
<body>

<p><input id="toggleButton" type="button" value="Hide" onclick="ToggleHideShow ()" /></p>
<div id="displayDiv" style="display: block;">This is a sample div</div>

</body>
</html>
 
Back
Top