Close and refresh parent

September 24, 2008 by Kenny Darcy

Hello George, Thanks for the snippet.
I want to be able to use this but in a thank you page. i.e I have a popup layer with an insert behaviour. when that insert is submitted the user is taken to a thank you page shown inside the pop up layer.

What I would be grateful for is help to close my thank you page after 2 seconds and refresh the parent page. I add below what I have tried but couldnt get it to work. below closes the p[op up layer but does not refresh the parent.



<meta http-equiv="Content-Type" content="text/html; charset="utf-8"">
<title>Untitled Document</title>
function init()
 setTimeout("parent.cDMXPopupWindow.closeWindow('dmxPopupMYWINDOW'); top.location.reload(true);",2000);
thanks you