Refresh main browser window when secondary window is closed.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to refresh a browser window when a secondary browser window
has been closed?

For example, I have a main web form that functions purely as a datagrid,
when a user clicks on a record in the datagrid a new window is opened (using
the javascript window.open function), from this window the user can update or
delete the record and then close the window once he/she is finished.
Obviously when the record is deleted it will still appear in the data grid in
the main form because the data has not been reloaded, however I would like to
force a reload of the data when the focus has returned back to the main form
containing the datagrid.

Does anyone know of a way to achieve this?
 
In case anyone else has the same question I found that if you create a close
button as follows....

<INPUT id="ButtonClose"
onclick="window.opener.document.forms[0].submit();window.close()"
type="button" value="Close" name="ButtonClose">

the parent window will then refresh whin the child window is closed.
 
Back
Top