1.
codice:
if (window.opener==undefined) {
 // codice da eseguire in caso di errore...
}
2.
codice:
window.opener.window.location.reload();
ciao