www.webdeveloper.com
Results 1 to 5 of 5

Thread: Closing Parent Window

  1. #1
    Join Date
    Jan 2003
    Location
    Glasgow
    Posts
    2

    Closing Parent Window

    Closing Parent Window

    HI there...
    I'm actually trying to close the very first page that opens when I get into the site.
    This page (plain html) confronts me with a text telling me about the need of
    flash 6 to go any further. providing me of two links...one to continue and the second which takes me to the macromedia link...etc...etc.

    OK...if I press continue a child chromeless window with my flash movie pops up (no scrollbars...nothing) and the parent window should
    close.

    Well...actually I've been testing this with explorer 5.1 and it worked fine
    but when I test it with Netscape 4.7 a warning message of Y/N closing main window comes across.

    Now...how could I fix this is it possible to close the parent window after the new chromeless window is fully uploaded?

    I've read somewhere about opening the window with java script???How??




    Sorry about the smilies...I'm new here.

  2. #2
    Join Date
    Nov 2002
    Location
    Baltimore, Maryland
    Posts
    12,270
    You cannot.
    “The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
    —Tim Berners-Lee, W3C Director and inventor of the World Wide Web

  3. #3
    Join Date
    Dec 2002
    Posts
    19
    Is this your site or are U visiting some elses page. If its not your page...then "NO" , but if its yours U can.
    Tables work, but eatin becomes messy!

  4. #4
    Join Date
    Jan 2003
    Location
    Glasgow
    Posts
    2
    Thanks Charles for replying...so far this is the answer I've been getting from different sources. That is way I'm quiet excited to know what DUMD-DO has got say.

    Yep...DUMD-DO... it is my site.

  5. #5
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Originally posted by Charles
    You cannot.
    Actually, yes you can. I was quite surpirsed myself to see that this works...

    Put this code in the head of the window you opened in a new window...

    Code:
    <script language=javascript>
    function closeopenerwin()
    {
    window.opener.close();
    }
    </script>
    ...and this is the body tag

    Code:
    <body onLoad="closeopenerwin();">
    Originally posted by DUMD_DO
    If its not your page...then "NO" , but if its yours U can.
    This also works cross domain, and, if you want to close your window after you open someone elses in a new window, that is possible as well, just use window.close() after you open the new window.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles