This function will open the new page in the Pop up window (ModalDialogBox) and when that is closed then the parent page will get refreshed. This is very similar to add new item in the list
<a onclick="OpenPopUpPage('http://SharePointPageLink', RefreshPage); return false;" href="">This will open the page in Pop up and will refresh the parent page when the Pop Up page is closed. < /a>
this is sharepoint Out of box Functionality.
we can also pass width and height of the window
say:
width =800;
height=500;
then
<a onclick="OpenPopUpPage('http://SharePointPageLink', RefreshPage,800,500); return false;" href="">test it< /a>
hope this will help some one.