Problem with refresh after changing Gateway

I’ve found a small problem with one of our web pages.
On this page we allow the user to change the IP address,Gateway and Subnet mask. Obviously after changing the IP you lose your connection and you have to point to the new address. but if either the subnet mask or gateway is changed the web page disapears and must be manually refreshed to see if the changes were really made.
We use a “POST” method after a submit button is pressed, I’m assuming that the interface closes the connection and the refresh command is lost.

My question is, how can I refresh the screen after changing the subnet mask of gateway?