Hi, I have a menu that toggles correctly in IE but is failing in
FireFox V.1 and Netscape 7.1. The FireFox JavaScript Console is
returning the following error; Error: document.getEle mentById(showDi v)
has no properties.
Any advice would be much appreciated. Here is the snippet of applicable
code;
<script language="javas cript">
function toggleDiv( showDiv, hideDiv, showTab)
{
document.getEle mentById(showDi v).style.displa y = '';
document.getEle mentById(hideDi v).style.displa y = 'none';
document.getEle mentById("newsT D").backgrou nd =
'/Images/Banner/240_t_tab_' + showTab + '.gif'
}
function openWindow(file name, name, width, height)
{
windowops =
eval("'toolbar= no,location=no, directories=no, status=no,menub ar=no,scrollbar s=no,resizable= no,width="
+ width + ",height=" + height + "'");
var newWindow = window.open(fil ename, name, windowops);
newWindow.focus ();
newWindow = '';
return;
}
</script>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- News listing -->
<td rowspan="2" align="right" valign="top" width="253"><br >
<table border="0" cellpadding="0" cellspacing="0"
width="240">
<tr>
<td align="center">
<%= w3ss.putField(" addBannerLink2" ) %><br>
<%= w3ss.putField(" catalogLink") %> <br>
</td>
</tr>
<tr>
<td id="newsTD"
background="/Images/Banner/240_t_tab_1.gif " width="100%" height="17">
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="120" style="cursor:h and;"
onclick="javasc ript:toggleDiv( 'memberNews', 'intheNews', '1' );"><img
border="0" src="/Images/Banner/1x1_transp.gif" width="5"
height="1"><spa n class="menuTab" ><%= w3ss.putField(" newsCaption")
%></span</td>
<td width="120" style="cursor:h and;"
onclick="javasc ript:toggleDiv( 'intheNews', 'memberNews', '2' );"><img
border="0" src="/Images/Banner/1x1_transp.gif" width="5"
height="1"><spa n class="menuTab" ><%= w3ss.putField(" inthenewsCaptio n")
%></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"
background="/Images/Banner/240_m_tab.gif"> <ul>
<div id="membernews " class="ingress" >
<br>
<%=
ficpa.renderNew sList(Document. Fields("memberN ewsFolders"), "title", "",
"", false, Document.Fields ("maxMemNewsIte m"), "publishTim e", false ) %>
<br>
<img src=/images/banner/bul.gif
border=0> <a href="<%=ficpa. siteURL()%>Top_ Stories">Recent
top stories</a>
</div>
<div id="inthenews" style="display: none;"
class="ingress" >
<br>
FireFox V.1 and Netscape 7.1. The FireFox JavaScript Console is
returning the following error; Error: document.getEle mentById(showDi v)
has no properties.
Any advice would be much appreciated. Here is the snippet of applicable
code;
<script language="javas cript">
function toggleDiv( showDiv, hideDiv, showTab)
{
document.getEle mentById(showDi v).style.displa y = '';
document.getEle mentById(hideDi v).style.displa y = 'none';
document.getEle mentById("newsT D").backgrou nd =
'/Images/Banner/240_t_tab_' + showTab + '.gif'
}
function openWindow(file name, name, width, height)
{
windowops =
eval("'toolbar= no,location=no, directories=no, status=no,menub ar=no,scrollbar s=no,resizable= no,width="
+ width + ",height=" + height + "'");
var newWindow = window.open(fil ename, name, windowops);
newWindow.focus ();
newWindow = '';
return;
}
</script>
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<!-- News listing -->
<td rowspan="2" align="right" valign="top" width="253"><br >
<table border="0" cellpadding="0" cellspacing="0"
width="240">
<tr>
<td align="center">
<%= w3ss.putField(" addBannerLink2" ) %><br>
<%= w3ss.putField(" catalogLink") %> <br>
</td>
</tr>
<tr>
<td id="newsTD"
background="/Images/Banner/240_t_tab_1.gif " width="100%" height="17">
<table border="0" cellpadding="0" cellspacing="0"
width="100%">
<tr>
<td width="120" style="cursor:h and;"
onclick="javasc ript:toggleDiv( 'memberNews', 'intheNews', '1' );"><img
border="0" src="/Images/Banner/1x1_transp.gif" width="5"
height="1"><spa n class="menuTab" ><%= w3ss.putField(" newsCaption")
%></span</td>
<td width="120" style="cursor:h and;"
onclick="javasc ript:toggleDiv( 'intheNews', 'memberNews', '2' );"><img
border="0" src="/Images/Banner/1x1_transp.gif" width="5"
height="1"><spa n class="menuTab" ><%= w3ss.putField(" inthenewsCaptio n")
%></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="100%"
background="/Images/Banner/240_m_tab.gif"> <ul>
<div id="membernews " class="ingress" >
<br>
<%=
ficpa.renderNew sList(Document. Fields("memberN ewsFolders"), "title", "",
"", false, Document.Fields ("maxMemNewsIte m"), "publishTim e", false ) %>
<br>
<img src=/images/banner/bul.gif
border=0> <a href="<%=ficpa. siteURL()%>Top_ Stories">Recent
top stories</a>
</div>
<div id="inthenews" style="display: none;"
class="ingress" >
<br>
Comment