Ver Mensaje Individual
  #5 (permalink)  
Antiguo 16/08/2006, 15:57
Avatar de skatomundo
skatomundo
 
Fecha de Ingreso: junio-2002
Ubicación: Santiago - CL
Mensajes: 2.532
Antigüedad: 22 años, 8 meses
Puntos: 125
PAGINA "MADRE"
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<script type="text/JavaScript">

function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}

</script>

<script>
function addToParentList2(valor1) {
window.document.form1.NOMBOPERADOR.value = valor1.value;
}
</script>

</head>

<body>
<form id="form1" name="form1" method="post" action="">
<p>

<?php /* //Input al que será asignado el valor pasado del PopUp */?>
<input name="NOMBOPERADOR" type="text" class="txt" id="NOMBOPERADOR" size="35" />
<a href="#" onclick="MM_openBrWindow('popup.php','','width=700 ,height=700')">abrir pop up</a> </p>
</form>
</body>
</html>

PAGINA POPUP
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html xmlns="http://www.w3.org/1999/xhtml">
<
head>
<
meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<
title>Untitled Document</title>
<
script language="javascript">

function 
addSelectedItemsToParent() {
self.opener.addToParentList2(window.document.forms[0].valoropciones);
window.close();
}

</script>
</head>

<body>
<form name="form1">
<input name="valoropciones" type="hidden">
<p>&nbsp;</p>
<ul>
<li><a href="#" onclick="javascript:window.document.forms[0].valoropciones.value='opcion1';addSelectedItemsToParent();">Opcion 1 </a></li>
<li>sdfsdfsdf</li>
</ul>
</form>
</body>
</html>