Dear All Experts
I wrote a simple code in javascript and it is working fine with IE and Firefox but the out put in php array count is correct in IE but not correct in Firefox
Please check the code attached here.
<script language="javascript">
var arrdimensions = {
"codimesion":{"s":{'0':'dimesion1','1':'dimesion2','2':'dimesion3','3':'dimesion4','4':'dimesion5','5':'dimesion6','6':'dimesion7'},"c":1,"m":"50", "sc":1, "f":"nopcs[]"}
};
function adddimensions(what) {
parentId = gbi(what);
var count = 0;
for (idx in arrdimensions[what]['s']) {
count++;
}
var trElem = document.createElement('tr');
var contentId;
var txt = new Array();
for (var i=0; i<count; i++) {
var tdElem = document.createElement('td');
tdElem.innerHTML = gbi(arrdimensions[what]['s'][i]).innerHTML;
trElem.appendChild(tdElem);
}
parentId.appendChild(trElem);
var f = document.getElementsByName(arrdimensions[what]["f"]);
f[arrdimensions[what]["c"] + arrdimensions[what]["sc"]].focus();
// f[arrdimensions[what]["c"]+arrdimensions[what]["sc"]].focus();
arrdimensions[what]["c"] += arrdimensions[what]["sc"];
return true;
}
function gbi(layerid) {
return document.getElementById(layerid);
}
</script>