Hi,
I have a strange problem using Internet Explorer.
My page has a table included in a <DIV>
I have a checkbox that shows the div when checked
and hides it when unchecked.
var division = document.getElementById("passport") ;
Then I use
division.style.visibility = "visible" ;
or
division.style.visibility = "hidden" ;
Everything works perfectly under FireFox or Safari showing or
hidding the table.
BUT, in IExplorer 6 or 7, just checking the checkbox doesn't
change anything. You have to first click on the actual division
position to make it appear. Same for unchecking: click on the
displayed table and it will disappear.
Any clue why???
Here is the code sample.
<body>
<script language="javascript">
function showhide(selectObj) {
var status = selectObj.checked ;
var division = document.getElementById("passport") ;
if( status == true ) {
division.style.visibility = "visible" ;
}
else {
division.style.visibility = "hidden" ;
}
}
</script>
<FORM id="form1" name="form1" method="post" action="">
<INPUT name="delivered" type="checkbox" onChange="showhide(this)"
value=""/>
<label>Delivered</label></p>
<div id="passport" style="visibility:hidden">
<table width="700" border="1" cellpadding="0">
<tr>Phone:</td>
<td colspan="3">
<INPUT name="phone" type="text" size="24" />
</td>
</tr>
<tr>
<td><label for="passrecu">Pass rcvd </label></td>
<td><input type="text" id="passrecu" /></td>
<td> </td>
<td><label for="passdelivre">delivered</label></td>
<td><input type="text" id="passdelivre" /></td>
</tr>
</table>
</div>
</form>
</body>
Sincerely,
Steve JORDI
(Remove the K_I_L_LSPAM from my email address)
------------------------------------------------
1197 Prangins Email: st*******************@hotmail.com
Switzerland WWW: www.sjordi.com
------------------------------------------------
Volcanoes at www.sjordi.com/volcanoes
MovieDB at www.sjmoviedb.com
------------------------------------------------