Please excuse me If I am posting to the wrong group. I was recommended
here from one of the Database groups I regularly track.
I have a small script that loads a table with some elements visiblity =
hidden and display = none. When clicking on the link it "opens" the
hidden table elements. When click on the link again it "hides" the
elements.
Now this works dandy in IE but in FireFox the element "opens" but when
you click on it again to "hide" the text in the cell disappears but the
actual element itself does not "dissappear " leaving a big blank space.
Working sample is here http://www.jhdesigninc.com/testJava.asp Its not
"pretty" because I eliminated all the code I possible could to make the
problem easier to understand.
Code Sample-----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<Meta Http-Equiv="Content-Type" Content="text/html;
charset=iso-8859-1">
<titleblah-blah </title>
<style type="text/css">
<!--
..style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
-->
</style>
<script type="text/JavaScript">
function changeView(objC hange){
/*have tried sniffing browser and not using getElement
didnt seem to help with display or visibilty
Im missing something really basic
*/
if (document.getEl ementById(objCh ange).style.vis ibility ==
'visible'){
document.getEle mentById(objCha nge).style.disp lay = "none";
document.getEle mentById(objCha nge).style.visi bility = "hidden";
} else {
document.getEle mentById(objCha nge).style.disp lay = "block";
document.getEle mentById(objCha nge).style.visi bility =
"visible";
}
}
</SCRIPT>
</head>
<body>
<table width="449" border="0" cellspacing="1" cellpadding="1" >
<tr valign="top">
<td width="100%" align="left" nowrap<span class="style1"> Click on
the LINK Its works in IE and Netscape but not Fox. <br>
The window does not go to display:none and visibility:hidd en<br>
In Firefox compare IE and Firefox by clicking on the view<br>
button multiple times in both browsers
</span><br>
<br>
<BR>
<table width="100%" border="0" cellspacing="2" cellpadding="0"
id="clickTbl">
<tr class="tblHeade r">
<td class="tblHeade r">Approver</td>
<td class="tblHeade r">Status</td>
<td class="tblHeade r">Date</td>
<td class="tblHeade r">Time</td>
<td class="tblHeade r">Notes</td>
</tr>
<tr>
<td>Bill Gordon</td>
<td> Await ing Approval</td>
<td> Pendi ng</td>
<td> Pendi ng</td>
<td> <a href="#" onClick="change View('notes');" >View
</a></td>
</tr>
<tr id="notes" style="visibili ty:hidden; display:none;">
<td colspan="5" bgcolor="#99339 9"><p>some tesa safd asfd
asddfdasdf
fasd fasfd as dfas df asdf asdf asdf as dfas df asdf asd
f asdf
asdf asd asdfasda</p>
<p>asdasdfasd f</p>
<p>asdf</p>
<p>a</p>
<p>sdf </p></td>
</tr>
<tr>
<td>Brenda Hudson</td>
<td> Und er Review</td>
<td> Pendi ng</td>
<td> Pendi ng</td>
<td> Cel l Below Not Relevant</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
End Code-------------------------------
Any help would be greatly appreciated.
Thanks,
Earl
here from one of the Database groups I regularly track.
I have a small script that loads a table with some elements visiblity =
hidden and display = none. When clicking on the link it "opens" the
hidden table elements. When click on the link again it "hides" the
elements.
Now this works dandy in IE but in FireFox the element "opens" but when
you click on it again to "hide" the text in the cell disappears but the
actual element itself does not "dissappear " leaving a big blank space.
Working sample is here http://www.jhdesigninc.com/testJava.asp Its not
"pretty" because I eliminated all the code I possible could to make the
problem easier to understand.
Code Sample-----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<Meta Http-Equiv="Content-Type" Content="text/html;
charset=iso-8859-1">
<titleblah-blah </title>
<style type="text/css">
<!--
..style1 {
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
-->
</style>
<script type="text/JavaScript">
function changeView(objC hange){
/*have tried sniffing browser and not using getElement
didnt seem to help with display or visibilty
Im missing something really basic
*/
if (document.getEl ementById(objCh ange).style.vis ibility ==
'visible'){
document.getEle mentById(objCha nge).style.disp lay = "none";
document.getEle mentById(objCha nge).style.visi bility = "hidden";
} else {
document.getEle mentById(objCha nge).style.disp lay = "block";
document.getEle mentById(objCha nge).style.visi bility =
"visible";
}
}
</SCRIPT>
</head>
<body>
<table width="449" border="0" cellspacing="1" cellpadding="1" >
<tr valign="top">
<td width="100%" align="left" nowrap<span class="style1"> Click on
the LINK Its works in IE and Netscape but not Fox. <br>
The window does not go to display:none and visibility:hidd en<br>
In Firefox compare IE and Firefox by clicking on the view<br>
button multiple times in both browsers
</span><br>
<br>
<BR>
<table width="100%" border="0" cellspacing="2" cellpadding="0"
id="clickTbl">
<tr class="tblHeade r">
<td class="tblHeade r">Approver</td>
<td class="tblHeade r">Status</td>
<td class="tblHeade r">Date</td>
<td class="tblHeade r">Time</td>
<td class="tblHeade r">Notes</td>
</tr>
<tr>
<td>Bill Gordon</td>
<td> Await ing Approval</td>
<td> Pendi ng</td>
<td> Pendi ng</td>
<td> <a href="#" onClick="change View('notes');" >View
</a></td>
</tr>
<tr id="notes" style="visibili ty:hidden; display:none;">
<td colspan="5" bgcolor="#99339 9"><p>some tesa safd asfd
asddfdasdf
fasd fasfd as dfas df asdf asdf asdf as dfas df asdf asd
f asdf
asdf asd asdfasda</p>
<p>asdasdfasd f</p>
<p>asdf</p>
<p>a</p>
<p>sdf </p></td>
</tr>
<tr>
<td>Brenda Hudson</td>
<td> Und er Review</td>
<td> Pendi ng</td>
<td> Pendi ng</td>
<td> Cel l Below Not Relevant</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
End Code-------------------------------
Any help would be greatly appreciated.
Thanks,
Earl
Comment