Ver Mensaje Individual
  #5 (permalink)  
Antiguo 22/07/2010, 09:32
osek2112
 
Fecha de Ingreso: julio-2010
Mensajes: 25
Antigüedad: 13 años, 10 meses
Puntos: 0
Sonrisa Respuesta: Cambiar color al texto haciendo click en imagen

Hola,

Gracias por tu respuesta. Estuve probando lo que me dijiste, pero nada, no me funciona.

Éste es el código:

<script language="javascript">
function cambiarColor(a,b){
var a=document.getElementId(a);
a.style.color=b;
}
</script>

<td><div id="texto_de_color">Cecilia Cabello</div></td>
<td><a href="http://www.yahoo.com" onClick="window.open(this.href, this.target, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=400, height=150, top=85, left=140'); cambiarColor('texto_de_color','#FF0000'); return false;"><img src="images/lock.png" width="32" height="32" border="0"/>
</a></a></td>
<td><a href="http://www.google.com.pe" onClick="window.open(this.href, this.target, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, width=400, height=150, top=85, left=140'); cambiarColor('texto_de_color','#0000FF'); return false;"><img src="images/unlock.png" width="32" height="32" border="0"/></a></td>


¿Tienes alguna idea de porqué?, ¿qué me ha faltado?

Gracias por la ayuda.

Saludos,