Ver Mensaje Individual
  #5 (permalink)  
Antiguo 20/11/2008, 06:36
Avatar de EPROM
EPROM
 
Fecha de Ingreso: abril-2005
Mensajes: 51
Antigüedad: 19 años, 1 mes
Puntos: 3
Respuesta: [Problema] Enviar este valor a la funcion javascript

Prueba con esto...

Código:
<script>
function cambiaImg(img,id) {
document.getElementById("img_" + id).src = img;
}
</script>

</head>
<body>


<img src="<? echo $array[$i][IMG]."1.jpg" ?>" name=<? echo "foto".$array[$i][ID] ?> id="img_<? echo "foto".$array[$i][ID] ?>" onmouseover="cambiaImg('<? echo $array[$i][IMG]."1b.jpg" ?>','<? echo "foto".$array[$i][ID] ?>')" onmouseout="cambiaImg('<? echo $array[$i][IMG]."1.jpg" ?>','<? echo "foto".$array[$i][ID] ?>')">