jasondavis
07-22-2009, 07:15 AM
<script>
function mF() {
var l =document.getElementById("boxes");
var t =l.getElementsByTagName("li");
var myTopID =[];
f =Math.min(t.length, N);
for (i =0; i <f; i++) {
myTopID[i] =t[i].title;
//cell background color when selected as a top 4,8,12,16 item
t[i].style.backgroundColor = "cc3333";
//cool(myTopID);
}
document.PageForm.myTopFriends.value = myTopID.join(",");
for (i =N; i <t.length; i++){
//cell background color when NOT selected
t[i].style.backgroundColor = "ebebeb";
}
}
</script>
This line
t[i].style.backgroundColor = "cc3333";
changes the selected cells to a different color, it works perfect in firefox but in google chrome and IE it does not change the color, any help would be awsome in getting this to work
function mF() {
var l =document.getElementById("boxes");
var t =l.getElementsByTagName("li");
var myTopID =[];
f =Math.min(t.length, N);
for (i =0; i <f; i++) {
myTopID[i] =t[i].title;
//cell background color when selected as a top 4,8,12,16 item
t[i].style.backgroundColor = "cc3333";
//cool(myTopID);
}
document.PageForm.myTopFriends.value = myTopID.join(",");
for (i =N; i <t.length; i++){
//cell background color when NOT selected
t[i].style.backgroundColor = "ebebeb";
}
}
</script>
This line
t[i].style.backgroundColor = "cc3333";
changes the selected cells to a different color, it works perfect in firefox but in google chrome and IE it does not change the color, any help would be awsome in getting this to work