What am I missing here? btw, this seems to only work in IE, which is fine for the moment...
You'll notice that when you click the button, the div that appears doesn't hide the contents directly below it.
Thanks in advance.
-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook
Code:
<html>
<head>
<title>Language selector</title>
<style type="text/css">
div.lang{
position: absolute;
visibility:'hidden';
font-size: 10px;
float: left;
border: 1px solid #000000;
padding: 2px 2px 2px 2px ;
z-index: 0;
}
.set1
{
font-size: 10px;
font-family: verdana,geneva;
size: 10;
}
</style>
<script language="javascript">
function showDiv()
{
var curDiv = document.getElementById('lang')
if( curDiv.shown == '0' )
{
curDiv.style.visibility = 'visible';
curDiv.style.zIndex = 100;
curDiv.shown = '1';
}
else
{
curDiv.style.visibility = 'hidden';
curDiv.style.zIndex = 0;
curDiv.shown = '0';
document.getElementById('curLang').value = document.getElementById('langE').value
document.getElementById('curLang1').value = document.getElementById('langF').value
}
}
</script>
</head>
<body>
<table border="0" cellspacing="1" cellpadding="1">
<tr>
<td width="60" class="set1">English:</td>
<td><input class="set1" type="text" id="curLang" lang="E" readonly></td>
<td><button onclick="showDiv()" style="width:10px;height:10px"></button></td>
</tr>
<tr>
<td colspan="3">
<div class="lang" id="lang" shown="0">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="60" class="set1">English:</td>
<td><input class="set1" type="text" id="langE"></td>
</tr>
<tr>
<td width="60" class="set1">French:</td>
<td><input class="set1" type="text" id="langF"></td>
</tr>
</table>
</div>
</td>
</tr>
<tr style="position:relative;top:-2">
<td class="set1">French:</td>
<td><input class="set1" type="text" id="curLang1" lang="F" readonly></td>
<td class="set1">Stuff that's supposed to be below the div is dynamic...</td>
</tr>
</table>
</body>
</html>
You'll notice that when you click the button, the div that appears doesn't hide the contents directly below it.
Thanks in advance.
-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook