Closing HTML window from child frame

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi guys, I'm trying to create an HTML page that contains two frames.
The bottom frame should simply be some website, but the top frame needs
to have a close link to kill the window. I tried calling
'document.window.close()' from the child frame, but without success. I
then tried putting the 'close()' call in the parent page and calling it
from the child, but still without success.

Can anyone take a look at the HTML/Javascript below and let me know
where I'm going wrong?

 * * * * PARENT.HTML * * * *

    <TITLE>Parent page</TITLE>
  <SCRIPT LANGUAGE="javascript">
    function doClose() {
          alert('I have been called!');
  <FRAMESET ROWS="5%,95%">
    <FRAME SRC="child.html">
    <FRAME SRC=" ">

 * * * * CHILD.HTML * * * *

    <TITLE>Child frame</TITLE>
      <A HREF="javascript:parent.doClose();">
          <BIG> [ CLOSE WINDOW ] </BIG>

 * * * * END * * * *

Many thanks in advance

Site Timeline