Estoy creando una ventana emergente que va a hello.html. Quiero que mi original (página padre) vuelva a cargar cuando cierro la ventana emergente (hello.html). Parece que no puedo hacer que funcione, pero estoy cerca. Aquí está el código que tengo hasta ahora para la página principal y la página hello.html ....Refrescando ventana principal después de cerrar ventana emergente
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
function open_win()
{
window.open("hello.html","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400");
}
</script>
<script language="JavaScript">
function refreshParent() {
window.opener.location.href = window.opener.location.href;
if (window.opener.hello.html)
{
window.opener.hello.html.close()
}
window.close();
}
</script>
</head>
<body>
<script type="text/javascript">
var d=new Date();
document.write(d);
</script>
<form>
<input type="button" value="Open Window" onclick="open_win()">
</form>
</body>
</html>
aquí es el hello.html ...
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript">
</script>
</head>
<body>
Hello
</body>
</html>
Compruebe esto: http://stackoverflow.com/questions/18321323/submit-form-reload-parent-and-close-child/36855748#36855748 podría ayudar a alguien – NoNaMe