Refresh main browser window when secondary window is closed.

Discussion in 'ASP .Net' started by =?Utf-8?B?R2FyeQ==?=, Nov 11, 2005.

  1. 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?
     
    =?Utf-8?B?R2FyeQ==?=, Nov 11, 2005
    #1
    1. Advertisements

  2. 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.
     
    =?Utf-8?B?R2FyeQ==?=, Nov 11, 2005
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?c3Vu?=

    end session when the browser window is closed.

    =?Utf-8?B?c3Vu?=, Apr 6, 2005, in forum: ASP .Net
    Replies:
    8
    Views:
    10,079
    James Steele
    Apr 6, 2005
  2. Morten Wennevik
    Replies:
    3
    Views:
    506
    =?Utf-8?B?U3JlZWppdGggUmFt?=
    Nov 2, 2005
  3. Replies:
    0
    Views:
    397
  4. Matt Kruse
    Replies:
    5
    Views:
    577
    Richard Cornford
    Sep 9, 2003
  5. Charles Packer

    Secondary window won't resize

    Charles Packer, Dec 26, 2003, in forum: Javascript
    Replies:
    2
    Views:
    217
    Charles Packer
    Dec 28, 2003
  6. MEM
    Replies:
    3
    Views:
    255
    Thomas 'PointedEars' Lahn
    Oct 10, 2004
  7. Robert Oschler
    Replies:
    1
    Views:
    507
  8. TM360
    Replies:
    2
    Views:
    363
    TM360
    Jun 30, 2005
Loading...