Refresh main browser window when secondary window is closed.

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?
 
G

Guest

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top