Ver Mensaje Individual
  #9 (permalink)  
Antiguo 26/04/2013, 16:04
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: llamar funcion click de una ventana padre

mirá, amplié mi ejemplo anterior y funciona, no lo hice con una nueva ventana.
Agregaste el id al nuevo botón?


Código HTML:
<!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>
<title>titulo</title> 
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<script type="text/javascript">
//<![CDATA[
function sa(){
boton.setAttribute('title','Título Agregado');
if(navigator.userAgent.indexOf("MSIE 7.0") != -1){
boton.onclick = function(){ eval(nombreFuncion(this)); };
}else{
boton.setAttribute('onclick','nombreFuncion(this)',0);
}
}

function nombreFuncion(elemento){
alert(elemento.id);
}


function crearBoton(){
var botonx=document.createElement("BUTTON");
botonx.id = "boton";
botonx.innerHTML = "boton con atributos agregados";
document.body.appendChild(botonx);
}
//]]>
</script>
</head>
<body>
<button onclick="crearBoton()">Crear Botón</button><br />
<button onclick="sa()">Agregar atributos</button><br />
</body>
</html> 

Si no pasá tus códigos, de padre e hija

SAludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.