Bueno, lo que quiero hacer es coger un link dentro de una tabla y hacer que toda la linea sea clickable. Para eso encontre un código que modifiqué un poco. Me funciona perfecto en FF pero no en IE. Este es el código:
Código:
if (navigator.userAgent.indexOf('MSIE') !=-1)
{
window.onload=function(){
ConvertRowsToLinks("table1");
}
function ConvertRowsToLinks(xTableId){
var rows = document.getElementById(xTableId).getElementsByTagName("tr");
for(i=0;i<rows.length;i++){
var links = rows[i].getElementsByTagName("a");
if(links.length == 1 && links.className == 'forumlink'){
rows[i].onclick = new Function("document.location.href='" + links[0].href + "'");
rows[i].onmouseover = new Function("this.className='highlight'");
rows[i].onmouseout = new Function("this.className='row1'");
rows[i].className = 'row1';
}
}
}
}
else {
window.onload=function(){
Rowlink();
}
function Rowlink(){
var rows = document.getElementsByTagName("tr");
for(i=0;i<rows.length;i++){
var link = rows[i].getElementsByClassName("forumlink");
if(link.length == 1){
rows[i].className = 'row1';
rows[i].onclick = new Function("document.location.href='" + link[0].href + "'");
rows[i].onmouseover = new Function("this.className='highlight'");
rows[i].onmouseout = new Function("this.className='row1'");
}
}
}
}
Lamentablemente IE no soporta la funcion getElementsByClassName y el script no funciona asi como esta, porque hay hasta tres links en una misma tabla y no sabe cual es el que tiene prioridad. De antemano gracias por la ayuda

.