L
lawrence
I've a big form with lots of options, and to keep things simple most
of the options are hidden in an invisible DIV. The basic options are
visible from the start. If people want the advanced options, they
click the "More Options?" link. You can see below a bit I'm using in
the middle of my forms to start the hidden DIV. The Javascript you see
works everywhere but in IE. On Netscape or FireFox, when the "More
Options" link is clicked, the hidden DIV becomes visible and becomes
500 pixels tall. On IE 6.0, however, the DIV becomes visible but only
gets a height of a few pixels - almost nothing is visible inside. Why
is this???
<input type="Submit" value="Click here when done"> <br /> <br />
<script language="javascript">
document.getElementById('optionalDiv').style.visibility='hidden';
document.getElementById('optionalDiv').style.display='none';
function makeOptionalDivVisible() {
document.getElementById('optionalDiv').style.visibility='visible';
document.getElementById('optionalDiv').style.height='500px;'
document.getElementById('optionalDiv').style.overflow='auto';
document.getElementById('optionalDiv').style.display='block';
}
</script>
<a href="#optionalDiv" onclick="makeOptionalDivVisible();">More
options?</a>
<div id="optionalDiv" class="optional">
<h2>This section is Optional</h2><h4>for more advanced and detailed
control</h4>
<hr>
of the options are hidden in an invisible DIV. The basic options are
visible from the start. If people want the advanced options, they
click the "More Options?" link. You can see below a bit I'm using in
the middle of my forms to start the hidden DIV. The Javascript you see
works everywhere but in IE. On Netscape or FireFox, when the "More
Options" link is clicked, the hidden DIV becomes visible and becomes
500 pixels tall. On IE 6.0, however, the DIV becomes visible but only
gets a height of a few pixels - almost nothing is visible inside. Why
is this???
<input type="Submit" value="Click here when done"> <br /> <br />
<script language="javascript">
document.getElementById('optionalDiv').style.visibility='hidden';
document.getElementById('optionalDiv').style.display='none';
function makeOptionalDivVisible() {
document.getElementById('optionalDiv').style.visibility='visible';
document.getElementById('optionalDiv').style.height='500px;'
document.getElementById('optionalDiv').style.overflow='auto';
document.getElementById('optionalDiv').style.display='block';
}
</script>
<a href="#optionalDiv" onclick="makeOptionalDivVisible();">More
options?</a>
<div id="optionalDiv" class="optional">
<h2>This section is Optional</h2><h4>for more advanced and detailed
control</h4>
<hr>