Ver Mensaje Individual
  #5 (permalink)  
Antiguo 11/09/2005, 00:55
acerossa
 
Fecha de Ingreso: septiembre-2004
Mensajes: 11
Antigüedad: 19 años, 7 meses
Puntos: 0
Aqui lo tengo , Gracias a Spider_Boy (foro.powers.cl)
Código:
<html> 
<head> 

<script language="Javascript"> 
function showimage() 
{
document.images.per.src = 'http://www.sitio/banner/' + document.form.per.options[document.form.per.selectedIndex].value; 
} 
function nombre() 
{ 
document.form.per.value = "http://sitio/banner/" + document.form.per.value; 
} 
</script> 


</head> 

<body> 

<table border=0 cellpadding=0 cellspacing=0> 
<td align="center" valign="middle"> 
Registro 
</tr></td> 
<tr><td> 

<?php 

$files = glob("*.jpg"); 

echo "<form name= 'form' method= 'post'>"; 

echo "<select id= 'per' name= 'per' onchange= 'showimage(); nombre()'>"; 
echo "<br><br>"; 

for($index = 0; $index < count($files); $index++) 
{ 
$cad1 = $files[$index]; 
$cad = explode(".",$cad1); 
?> 

<option value="<?php echo $files[$index]?>"><?php echo $cad[0];?></option> 

<?php 
} 
echo "</select>","<br><br>"; 
echo "<img src= 'banner.jpg' width=468 height=60 id= 'per' name= 'per'>"; 
echo "<input type='submit' name='Submit' value='Ver'>";

echo "</form>","<br>"; 
?> 

</tr></td> 

</table> 
</body> 
</html>