jookie
12-05-2003, 02:29 PM
I'm trying to create an expanding/collpasing menu for IE only. This works fine but only 1 time around, but errors out if u try again. Click on "load" and the hidden <div> appears. Click "unload" and it's gone. Try it again and nada. Any ideas? Thnx in adv...
<script>
function splat(vue){
this.vue = vue;
document.getElementById("load").style.display = vue;
}
</script>
<div id="main" style="width:400px; height:50px; border:1px solid #000000; padding:2px;">
<div id="controller">
<a href="#" onclick="splat('block'); empty.appendChild(load);">Load into shelf</a>
</div>
<div id="empty"></div>
<div id="bottom">
This is the bottom
</div>
</div>
<div id="load" style="height:100px; display:none;">
<a href="#" onclick="splat('none'); empty.removeChild(load);">Unload from shelf</a>
</div>
<script>
function splat(vue){
this.vue = vue;
document.getElementById("load").style.display = vue;
}
</script>
<div id="main" style="width:400px; height:50px; border:1px solid #000000; padding:2px;">
<div id="controller">
<a href="#" onclick="splat('block'); empty.appendChild(load);">Load into shelf</a>
</div>
<div id="empty"></div>
<div id="bottom">
This is the bottom
</div>
</div>
<div id="load" style="height:100px; display:none;">
<a href="#" onclick="splat('none'); empty.removeChild(load);">Unload from shelf</a>
</div>