Forum Moderators: open
<font id="c2719">21</font>)</small></i><i><small>(<font id="sc2719">37</font>
and here is the function I'm using to do that. Note I said "do" because it does update both "c##" and "sc##" but throws the error messages too.
function changeText2(){
var arrlength = arguments.length/3;//ex. 60/3 =20
var arrstartsc = arrlength+arrlength;//ex.40
var arrstartc = arrlength;//ex. 20
var c = "c";
var sc = "sc";
for( var i = 1; i < arrlength; i++ ) {////ex.20
document.getElementById(c+arguments[i]).innerHTML = arguments[arrlength+i];
document.getElementById(sc+arguments[i]).innerHTML = arguments[arrstartsc+i];
}
}
and here is the call to that function from inside an AJAX operation...
onmouseover=\"........ changeText2(".$cat_group_string.",".$cat_group_pops_string.",".$cat_sub_group_pops_string.")
and just before that function call I can echo the three variables in it as these
$cat_group_string 1 = 99,2807,2682,70,96,94,101,82,83,2717,72,100,77,95,80,84,81,93,98,71
count 2 = 20
cat_group_pops_string 2 = 0,0,0,0,0,10,0,1,0,0,0,0,0,0,1,0,0,0,0,0
count 3 = 20
cat_sub_group_pops_string 3 = 0,0,0,0,0,19,0,1,0,0,0,0,0,0,1,0,0,0,0,0
[edited by: eelixduppy at 12:32 am (utc) on Aug. 13, 2009]
[edit reason] disabled smileys [/edit]
I had first tried getting the "c" attached by making it a string but couldn't get it to work so I made a variable "c" to hold the string "c"., It worked.
Thanks all.