i have a link which pops out a new window and in that new window there is a forms which is used to update a record draw out from database depending on the the record id appended to the url like
edit-record.html?r-id=1;

now on the form where i will update the record and send the submit I made it in a way that once it is clicked on the pop up windows closes itself,

eg
Code:
<form action="edit.class.php" method="post"
...