Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/04/2010, 12:05
xav1
 
Fecha de Ingreso: marzo-2010
Mensajes: 30
Antigüedad: 14 años, 2 meses
Puntos: 0
Propiedades de imagen

Buenas tardes,

No toco mucho el javascript, pero me gustaria redimensionar una imagen a la mitad, he intentado sacar este código y no me acaba de funcionar....

Código PHP:
<script>
function 
aa(img) {
img1 = new Image();
img1.src img;
img1.width=img1.width/2;
img1.height=img1.height/2;   
}
</script> 
Código PHP:
<img src="<%=rs.fields(2)%>" onload="aa(<%=rs.fields(2)%>)" border="0"
en rs.fields(2) se almacena la ruta entera de la imagen

¿Que falla en el código?

Gracias.