Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/08/2006, 08:49
Avatar de KarlanKas
KarlanKas
Moderador extraterrestre
 
Fecha de Ingreso: diciembre-2001
Ubicación: Madrid
Mensajes: 6.987
Antigüedad: 22 años, 4 meses
Puntos: 61
Qué te parecería esto?
Código:
<html>
<head>
	<title>Untitled</title>
	<script>
	valores=new Array;
	pepepe=null;

	function generador(uno,dos,tres){
		this.caja1=uno;
		this.caja2=dos;
		this.caja3=tres;
	}
	
	valores[0]=new generador("Abuelito","Dime","Tú");
	valores[1]=new generador("Nunca debiste","Comer de mi plato","Tontuelo");
	valores[2]=new generador("tururururu","pompompompom","tururururu...");
	valores[3]=new generador("la","gallina","turulata");
	
	
	function elegir(a){
		document.forms['pepote']['pepe'].value=valores[a].caja1;
		document.forms['pepote']['pepe1'].value=valores[a].caja2;
		document.forms['pepote']['pepe2'].value=valores[a].caja3;
		pepepe.close();
	}
	
	
	</script>
</head>

<body>
<form name="pepote">
<input type="button" name="buscar" id="buscar" value="Buscar" onclick="pepepe=window.open('buscar.html','pepepe','width=400,height=200');"><br>

<input type="text" name="pepe"><br>
<input type="text" name="pepe1"><br>
<input type="text" name="pepe2"><br>
</form>


</body>
</html>
y buscar.html:
Código:
<html>
<head>
	<title>Untitled</title>
</head>

<body>
<a href="pepe.html" onclick="opener.elegir(1);return false">Primero</a><br>
<a href="pepe.html" onclick="opener.elegir(2);return false">Segundo</a><br>
<a href="pepe.html" onclick="opener.elegir(3);return false">Tercero</a><br>



</body>
</html>
¿te serviría?
__________________
Cómo escribir

No hay pregunta tonta, sino tonto que quiere seguir en la ignorancia.