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>