![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
17/09/2004, 08:23
|
| | Fecha de Ingreso: febrero-2004 Ubicación: Resistencia - Argentina
Mensajes: 299
Antigüedad: 21 años Puntos: 0 | |
Al cerrar el popup me pone en la caja de texto: Undefined
este es el codigo del formulario.php
<html>
<head>
<script language="JavaScript">
function buscar(){
open("Popup.php");
}
</script>
</head>
<body>
<form name="frm">
nombre
<input type="text" name="nombre" >
<input type="button" value="buscar" onclick="buscar()"><br>
</form>
</body>
</html>
y el popup.php:
<html>
<head>
<? if (isset($_POST['nombre'])){ ?>
<script type="text/javascript">
var texto = <? echo $_POST['nombre'];?>;
</script>
<script language="JavaScript">
opener.document.frm.nombre.value = texto;
close();
</script>
<? }?>
</head>
<body>
<form name="frm2" action="popup.php" method="post">
<input type="text" name="nombre" size="30" >
<input type="submit" name="enviar" value="Enviar" >
</form>
</body>
</html> |