cridley
05-02-2007, 09:04 AM
Hi All,
The following (pretty basic) html/js works differently in ie7/ff than it does in ie6. I'm after getting it to work as it does in ie6 accross all the aforementioned browsers. The Doctype affects its behaviour.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script language='javascript'>
function Expand()
{
var oDiv = document.getElementById("script_summary");
oDiv.style.visibility = (oDiv.style.visibility == "visible")?"hidden":"visible";
oDiv.style.overflow = (oDiv.style.overflow == "visible")?"hidden":"visible";
}
</script>
</head>
<body>
<a href='javascript:Expand()'><b><u>Click me to expand table :</u></b></a>
<br/>
<br/>
<div id="script_summary" style="visibility:hidden; overflow:hidden; height:0px; border:thick #FF0000">
<table class="script_summary" border="0" cellspacing="1" >
<th align="left">Col 1</th>
<th align="left">Col 2</th>
<th align="left">Col 3</th>
<th align="left">Col4</th>
<tr><td>11</td><td>12</td><td>13</td><td>14</td></tr>
<tr><td>21</td><td>22</td><td>23</td><td>24</td></tr>
<tr><td>31</td><td>32</td><td>33</td><td>34</td></tr>
</table>
</div>
<div>
<table border="1" align='center' width='100%' cellpadding="0" cellspacing="0">
<tr><td valign='middle' align='center' class='head'>
Another Table
</td>
</tr>
</table>
<div>
</body>
</html>
Any ideas?
The following (pretty basic) html/js works differently in ie7/ff than it does in ie6. I'm after getting it to work as it does in ie6 accross all the aforementioned browsers. The Doctype affects its behaviour.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<script language='javascript'>
function Expand()
{
var oDiv = document.getElementById("script_summary");
oDiv.style.visibility = (oDiv.style.visibility == "visible")?"hidden":"visible";
oDiv.style.overflow = (oDiv.style.overflow == "visible")?"hidden":"visible";
}
</script>
</head>
<body>
<a href='javascript:Expand()'><b><u>Click me to expand table :</u></b></a>
<br/>
<br/>
<div id="script_summary" style="visibility:hidden; overflow:hidden; height:0px; border:thick #FF0000">
<table class="script_summary" border="0" cellspacing="1" >
<th align="left">Col 1</th>
<th align="left">Col 2</th>
<th align="left">Col 3</th>
<th align="left">Col4</th>
<tr><td>11</td><td>12</td><td>13</td><td>14</td></tr>
<tr><td>21</td><td>22</td><td>23</td><td>24</td></tr>
<tr><td>31</td><td>32</td><td>33</td><td>34</td></tr>
</table>
</div>
<div>
<table border="1" align='center' width='100%' cellpadding="0" cellspacing="0">
<tr><td valign='middle' align='center' class='head'>
Another Table
</td>
</tr>
</table>
<div>
</body>
</html>
Any ideas?