<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
    <Header>
      <Title>Javascript to close a popup and refresh the parent window</Title>
      <Shortcut>Javascripttocloseapopupandrefreshtheparentwindow</Shortcut>
      <Description>Javascript to close a popup and refresh the parent window [HTML &amp; Javascript]</Description>
      <Author>Greg Gamble</Author>
      <HelpUrl>/PreviewSnippet.aspx?SnippetID=c52f008d-7fc8-4dbc-970b-42f215c2b777</HelpUrl>
      <SnippetTypes>
        <SnippetType>SurroundsWith</SnippetType>
      </SnippetTypes>
    </Header>
    <Snippet>
      <Code Language="HTML &amp; Javascript"><![CDATA[<script type="text/javascript">
funtion closeMe()
{
window.opener.location.href = window.opener.location.href;closeWindow();
}
function closeWindow() 
{
window.open('','_parent','');
window.close();
}
</script>

#######################################################
Call the closeMe() function in the popup window and parent window will be updated, then  popup will closed. Works in Fireworks.]]></Code>
    </Snippet>
  </CodeSnippet>
</CodeSnippets>