Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/09/2005, 07:05
Faser
 
Fecha de Ingreso: noviembre-2002
Mensajes: 130
Antigüedad: 21 años, 5 meses
Puntos: 0
ya llo tengo.

por si alguien le interesa aquí les dejo el código


Código PHP:
<select name="Foto" size="10" onChange="previaFoto(this)">
<?php 
if ($dir = @opendir("ofertes")) {
while ((
$file readdir($dir)) !== false) {
?> 
<option value="<?php print "$file";?>"><?php print "$file";?></option>
 <?php

closedir($dir);
}
?>
</select>

LA FOTO DONDE SE VA A MOSTRAR CUANDO SELECCIONEMOS UNA IMAGEN DE LA LISTA:

<img name="fotoOferta" src="ofertes/<?php print "$file";?>" width="209" height="111">



Y EL CÓDIGO JAVASCRIPT NECESARIO PARA PODER SER VISUALIZADA LA IMAGEN

<script language="JavaScript">
function previaFoto(objecte){
document.Formulario.fotoOferta.src='ofertes/'+objecte.value;
}
</script>