<!DOCTYPE html>
<html>
    <head>
        <title>This is the child frame title</title>
        <script>
        function closeWin() {
          var iframe = window.parent.document.getElementById('childFrame');
          iframe.parentNode.removeChild(iframe)
        }
        </script>
    </head>
    <body id="childBody">
      <a href="javascript:void(0)" onClick="closeWin()">Close Window Now</a>
      <a href="javascript:void(0)" onClick="setTimeout(function(){closeWin()}, 10)">Close Window Soon</a>
      <iframe src="/frame_one" id="grandchildFrame1"></iframe>
      <iframe src="/frame_two" id="grandchildFrame2"></iframe>
    </body>
</html>
