# how do i get this javascript on a mac?



## soadfan (Feb 21, 2005)

i have this code that dynamically creates rows and columns in a table and populates it. it works in IE, firefox, netscape but i cant get it to work on a mac, so i need help:
you can see it tested here:
httttp://68.53.5.167/testtable.cfm

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:




any ideas?? thanks


----------



## iswan1 (Jul 13, 2007)

I have some dowt on the below code

$nextLevel='var tbodyElem = document.getElementById("'.$tmpNodeId.'").rowIndex;
alert(tbodyElem);trElem = tableBody.insertRow(tbodyElem+);
trElem.name='.$mainLevelNo.';
trElem.value='.$subLevelNo.';
trElem.id="'.$tmplformid.'";
tdElem=trElem.insertCell();
tdElem.value=0;
tdElem.style.textIndent='.$indents.';
tdElem.id="col_'.$tmplformid.'";
tdElem.className="'.$classStyle.'";';
this code is working in window's IE. but it is not working in MAC's FireFox.

Iswan1


----------



## iswan1 (Jul 13, 2007)

trElem = document.getElementById("tableBody").insertRow(tbodyElem+1);

This is working in both MAC and Windows. But,

tdElem=trElem.insertCell();

is not working. can you help me to solve this?


----------



## xrey (Jul 9, 2007)

According to statistics, only 4% of overall users are Macs and Safari is the native browser ( my preference is Firefox). If your code doesn't work only on IE Mac, I'm not sure you should expend this much effort because that audience is in decimal point. Otherwise, I think you're good.


----------

