Could someone tell my why this isn't working?
I checked the faqs to see how to get the size of a table. This function should return the actual width of the cell, or when I switch to 'menutable' - the width of the table.
I keep getting an Object required error
thanks - nicole
*the javascript is on a different page than the table.
<script >
function getCellWidth()
{
var cellwidth;
cellwidth = document.getElementById('menucell').offsetWidth;
return cellwidth;
}
Menu1=new Array("Saving","url","",4,27,getCellWidth());
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="menutable">
<tr height="35" id="menurow">
<td> </td>
<td align="left" valign="top" bgcolor="red" height="35" width="20%" id="menucell"><img src="/_imgs/_transparent.gif" width="0" height="0" alt="" border="0"><b><!--<a href="/saving/index.php3"><font color="ffffff">Saving </font></a>--></nobr></b></td>
</tr>
</table>
I checked the faqs to see how to get the size of a table. This function should return the actual width of the cell, or when I switch to 'menutable' - the width of the table.
I keep getting an Object required error
thanks - nicole
*the javascript is on a different page than the table.
<script >
function getCellWidth()
{
var cellwidth;
cellwidth = document.getElementById('menucell').offsetWidth;
return cellwidth;
}
Menu1=new Array("Saving","url","",4,27,getCellWidth());
</script>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="menutable">
<tr height="35" id="menurow">
<td> </td>
<td align="left" valign="top" bgcolor="red" height="35" width="20%" id="menucell"><img src="/_imgs/_transparent.gif" width="0" height="0" alt="" border="0"><b><!--<a href="/saving/index.php3"><font color="ffffff">Saving </font></a>--></nobr></b></td>
</tr>
</table>