Forum Moderators: open
if you try it on IE on a mac, it does nothing.
here is the exact code or you can view source on that page:
<script>
function setUp()
{
ns4=(document.layers)?1:0;
ie4=(document.all)?1:0;
sdom=(document.getElementById && (!(ie4¦¦ns4)))?1:0;
//alert(""+ns4+" "+ie4+" "+sdom);
if(ns4)
{
alert("Upgrade your browser");
}
else if(ie4)
{
sizeTablePath = document.all.sizeTable;
}
else if(sdom)
{
sizeTablePath = document.getElementById('sizeTable');
}
}
function populateSizeTable()
{
size = new Array(3);
size[1-1] = "26";
size[2-1] = "28";
size[3-1] = "30";
clearTable();
table = sizeTablePath;
var length = size.length;
var numCols = 7;
var numRows = Math.ceil(length / numCols);
for( i = 0; i < numRows; i++ )
{
row = table.insertRow(table.rows.length);
var cols = numCols*(i+1);
for( j = numCols*i; j < cols; j++ )
{
sizeNum = (j < length)?(size[j]):0;
cell1inner = (j < length)?"<font face='Arial' size='1'>" + sizeNum +"-</font>":" ";
cell2inner = (j < length)?"<input name='size" + sizeNum + "'type='text' size='2' maxsize='2' value='' >":" ";
cell1 = row.insertCell(row.cells.length);
cell1.setAttribute('align','center');
cell1.setAttribute('width','30');
cell1.innerHTML = cell1inner;
cell2 = row.insertCell(row.cells.length);
cell2.setAttribute('align','center');
cell2.setAttribute('width','47');
cell2.innerHTML = cell2inner;
}
}
}
function clearTable()
{
table = sizeTablePath;
while( table.rows.length > 0 )
{
table.deleteRow(0);
}
}
</script>
</head>
<body onload="setUp();">
<table id="sizeTable" width="200" border="0">
</table>
<input type="button"
onclick="populateSizeTable()"
value="Call function">
</body>
</html>
any ideas? is innerHtml supported on mac browsers? i read it does, so im not sure what else it could be. thanks
<html>
<head>
<SCRIPT LANGUAGE="JavaScript">
<!--
function menu1()
{
document.getElementById("inside").innerHTML = "<tr><td>your inner html</td></tr>";
}
// -->
</SCRIPT>
</head>
<body>
<DIV id="inside">
<table>
Used to be here
</table>
</DIV>
<input type="submit" onclick="menu1()">
</body></html>
I know this works for Mac version of IE. Something to remember when you are trying to please the Mac Gods is that Microsoft no longer has any plans for IE with Mac. It is quickly becoming a taboo to even have IE installed on Mac's nowadays. If you can't get it to work for IE Mac, but it works for everything else that you know of, I'd just leave it (if it were me). About 3% of surfers right now are using IE 5.x for Mac, so if your happy with 97% of your users being able to see your site... If you have a limited # of mac users that use your site, I'd tell them to get Firefox, or use Safari (inferior to Firefox albeit) which comes pre-installed on all Macintosh computers (OS X that is, if they are using OS 9, that's yet another quickly forming taboo).
-- Zak