Ver Mensaje Individual
  #27 (permalink)  
Antiguo 09/04/2005, 17:04
nostromo_
 
Fecha de Ingreso: diciembre-2004
Ubicación: Iquique, Chile
Mensajes: 150
Antigüedad: 19 años, 5 meses
Puntos: 0
Hola;

En referencia de mis comentarios, en las versiones anteriores esto no resultaba, ya que el DOM los toma distinto según la versión del navegador.

Aquí les dejo otra alternativa, a mi gusto la mejor.

Ventana padre html, maestro1.html

Código HTML:
<html>
<head>
<title></title>
<script>
var parametro;
function popup()
{
	parametro = window.open("copia1.html","","width=400,height=300");
	parametro.document.getElementById('1').value = "Pasar Valor al Padre :";
}
</script>
</head>
<body>
<form name=formul>
	<input type=button value="Valor Tabla" onclick=popup();>
		<br>
	Parametros de la Ventana 1 <input type=text size=20 id=resul_1 readonly>
</form>
</body>
</html> 

copia1.html


Código HTML:
<html>
<head>
<title>Prueba 1</title>
<style>
body {font-family:verdana;font-size:12px;}
.texto{font-family:verdna;font-size:12px;}
</style>
<script>
function enviar(obj)
{
	with(document)
	{
		var dat = getElementById(obj).value;
		with(opener.document)
		{
			getElementById('resul_1').value = dat;
		}
		//--- cerrar ventana actual---
		window.close();
	}
}
function leer(obj)
{
	with(document)
	{
		var n = getElementById(obj).value;
		var m = getElementById('1').value;
		getElementById('aqui').value = m + " " + n;
	}
}
function vacio()
{
	with(document)
	{
		var m = getElementById('1').value;
		getElementById('aqui').value = m;
	}
}
</script>
</head>
<body >
<table border=1 cellspacing=0 cellpadding=0 width=100 bgcolor=silver>
	<tr onmouseover=leer('d1'); onmouseout=vacio();>
		<td id=d1 value=men_1 onclick=enviar('d1');>Dato_1</td>
	</tr>
	<tr onmouseover=leer('d2'); onmouseout=vacio();>
		<td id=d2 value=men_2 onclick=enviar('d2');>Dato_2</td>
	</tr>
	<tr onmouseover=leer('d3'); onmouseout=vacio();>
		<td id=d3 value=men_3 onclick=enviar('d3');>Dato_3</td>
	</tr>
	<tr onmouseover=leer('d4'); onmouseout=vacio();>
		<td id=d4 value=men_4 onclick=enviar('d4');>Dato_4</td>
	</tr>
</table>
<input type=text id=aqui size=40 readonly>
<input type=hidden id=1 size=40 readonly>
</body>
</html> 
Nos vemos.

Última edición por nostromo_; 10/04/2005 a las 19:30