Jump to content

Refreshing A Page Using A New Window


murfitUK

Recommended Posts

I'm rubbish with javascript - have tried but just don't understand it.Suppose I have a page called payments.php which calls a database and then lists all the results. Against each result I would like a link called amend which opens a new small window containing the data for that record. I can do all this ok, its the next bit I need help with.If the user changes the amount (eg from 40 to 45) and then clicks the amend button I would like the small window to update the database then close the window and refresh the main page so that the change appears. I can manage to update the database but don't know how to then close the window and refresh the main page.Can anyone help?Thanks

Link to comment
Share on other sites

Ah, not too hard to accomplish, put this code in your popup window after you are all done processing the post back:

<script language="javascript">	var oParent = window.opener;	oParent.location.reload();	window.close();</script>

That should do the trick.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...