Hola
Adapta esto a lo que te ocupa
Código Javascript
:
Ver original<html>
<head>
<script type="text/javascript">
function abrir () {
var ancho = parseInt(((screen.width) / 2) - 150);
var alto = parseInt(((screen.height) / 2) - 150);
window.open('Insertar_Datos_DesdePOPUP.php','popup','resizable=yes, top='+alto+', left='+ancho+', width=300 ,height=300, menubar=no, scrollbars=no, status=no, titlebar=no, toolbar=no,directories=no');
}
</script>
</head>
<body>
<a href="javascript:void(0);" target="popup" hreflang="es" title="Imagen del Producto" onclick="abrir1();">Abrir</a><br />
<form name="form1">
Razon: <input type="text" id="camp1" name="camp1" value="" /><br />
Cliente: <input type="text" id="camp2" name="camp2" value="" /><br />
Calle: <input type="text" id="camp3" name="camp3" value="" />
</body>
</html>
Insertar_Datos_DesdePOPUP.php
Código PHP:
Ver original<?php
$razon = "Por que quiero";
$cliente = 12;
$calle = "Italia";
?>
<html>
<head>
</head>
<body>
Estos serán los datos que se enviarán al form<br />
Razon: <?php echo $razon?><br />
Cliente: <?php echo $cliente?><br />
Calle: <?php echo $calle?><br /><br />
<a href="#na" target="popup" hreflang="es" title="Imagen del Producto" onclick="enviar_datos_cliente();">Enviar Datos Al Form</a>
<script type="text/javascript">
function enviar_datos_cliente(){
window.opener.document.form1.camp1.value ="<?php echo $razon?>";
window.opener.document.form1.camp2.value ="<?php echo $cliente?>";
window.opener.document.form1.camp3.value ="<?php echo $calle?>";
self.close()
}
</script>
</body>
</html>
Suerte