prova ad aggiungere:

codice:
window.opener=self;
this.close();