Code: Select all
<script> var dt = document.getElementById('mytable'); var dtRows = document.getElementById('mytable').getElementsByTagName('tr'); function highlightSelected(){ //loop through entire table and remove highlighting id = document.getElementById('myid').value; for(var i=0;i<dt.rows.length;i++){ dt.rows[i].style.backgroundColor= (i%2==0) ? '#c5c5c5' : '#eeeeee'; } //get the selected row and highlight if(id!=0){document.getElementById(id).style.backgroundColor='red';} } highlightSelected();</script>Code: Select all
<tr id='$rowID' onclick='setSelected($rowID);'>Code: Select all
<input type='hidden' name='myid' id='myid' value='0'>On another note, it seems javascript might be caching some ajax code I have done as well.
Could this be a setting in my IE locally or is there something with IE7? (I don't currently have easy access to IE6 to verify)