Returning from popup screen

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

Guest

Help, Want someone's option. I'm calling a popup screen, say form B, to
add/edit a record. In, say form A, I call form B using javascript
window.open in server side code. I need to know when I come back to form A
so I can refresh the screen from the database if a record was added or the
data changed that I'm displaying. My question is: What is the best way to
figure out when form b finishes and return to form A so that I can run this
refresh routine? Hope this is clear?
Thank you,
Logger
 
One way to do this is to insert the following code (or something like it) in
the form B method that saves/updates your data.

Response.Write("<script>window.opener.location.href =
window.opener.location.href;</script>");
Response.Write("<script>window.close();</script>");

When your popup refreshes it will refresh the opener and then close the popup.
 
I don't understand how in form A I know I'm back from formB. Where do I
check in form A for the return.
Logger
 
You won't have to refresh A by knowing when the popup (B) closes because
popup B makes a javascript call to refresh A
Response.Write( said:
window.opener.location.href;</script>"); // written in popup(B)

before B closes itself.

Response.Write("<script>window.close();</script>");
 
ok, what I mean by refreshing is i have to read from the db and load my grid
which I'm using to display my data in form A. Where do I do this?
 
When page A refreshes (I am assuming that this page is already written)
because page B enters the command


The DB shoudl refresh the grid automatically.
 
Back
Top