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.

Cheers

Kenny

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