Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

On window close, reload opener ... How can I do this?

Status
Not open for further replies.

casabella

Programmer
Aug 30, 2007
59
US
Working on a data grid table which opens a window where a record can be edited. Once record is edited, I would like to trigger a mechanism that reloads calling page.

I have a CLOSE button which could be used to trigger the reload. I figure that if user closes clicking the X on upper right corner or ALT-F4, the calling window will not reload but I can live with that.

Any suggestions?

Thanks,


Jose
 
Well, it seems that I came up with a solution.

I am using PHP on the server side, so I added a line of code to my window page which executes as form is submitted.

I am simply checking for variable to determine if a valid submission took place, if so, I then dynamically add this within the head tag

Code:
<script language="JavaScript" type="text/javascript">window.opener.location.reload(true);</script>

It works !!!! :cool:

Regards,


Jose
 
Jose,
I'm trying to do the same thing you describe above. Could you possibly show me your entire Javascript with any sensative code removed? I would like to especially see the code on your buttons.

Thanks,
Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top