Ver Mensaje Individual
  #18 (permalink)  
Antiguo 09/07/2004, 04:15
Avatar de derkenuke
derkenuke
Colaborador
 
Fecha de Ingreso: octubre-2003
Ubicación: self.location.href
Mensajes: 2.665
Antigüedad: 21 años, 4 meses
Puntos: 45
Mira, te he hecho una funcion que sirve para cualquier celda:

Código PHP:
function rollover(id,color,bgColor) {
    var 
anteriorColor,anteriorBackgroundColor;
    
document.getElementById(id).onmouseover=function() {
        
anteriorBackgroundColor=this.style.backgroundColor;        //guardamos valores
        
anteriorColor=this.style.color;
        
this.style.backgroundColor=color;                    //nuevos valores
        
this.style.color=bgColor;
    }
    
document.getElementById(id).onmouseout=function() {
        
this.style.backgroundColor=anteriorBackgroundColor;                    //reestablecemos antiguos valores
        
this.style.color=anteriorColor;
        
anteriorBackgroundColor=anteriorColor=null;
    }

Con esta funcion, teniendo tu codigo (ordenado y ya transformado a css, y le he añadido otra celda para que veas el funcionamiento. Tenias una etiqueta width despues de table que no existe, supongo que la habras querido poner como atributo ):

Código:
<table bgcolor="#ff9933">
	<tr>
		<td id="celda" width="141" height="16" style="background-color:#E4E4E4; font-family:verdana; font-size:10px; color:#014058; border: 1px solid #FFFFFF; padding: 1px 4px 1px 4px; ">
			<img src="../fresh/jpgs/bullet.GIF" width="7" height="7" border="0" align="center"> 
			<b>Registrate</b>
		</td>
	</tr>
	<tr>
		<td id="celda2" width="141" height="16" style="background-color:#E4E4E4; font-family:verdana; font-size:10px; color:#014058; border: 1px solid #FFFFFF; padding: 1px 4px 1px 4px; ">
			<img src="../fresh/jpgs/bullet.GIF" width="7" height="7" border="0" align="center"> 
			<b>Logueate</b>
		</td>
	</tr>
</table>
Para que sea activo el rollover solo tienes que hacer por ejemplo unas llamadas a la funcion asi:

Código PHP:
rollover("celda","red","blue");
rollover("celda2","#000000","#ffffff"); 
Primero el id de la celda, luego el color del texto y luego el color de fondo, asi se creara automaticamente el rollover.


Espero que te guste.
__________________
- Haz preguntas inteligentes, y obtendrás más y mejores respuestas.
- Antes de postearlo Inténtalo y Búscalo.
- Escribe correctamente tus mensajes.