www.webdeveloper.com
Results 1 to 3 of 3

Thread: close frame from within

  1. #1
    Join Date
    Apr 2008
    Posts
    157

    close frame from within

    Hello,

    I got the following code:
    <body>
    <div id="overlay"
    <frame src="bla.php"></frame>
    </div>
    <a href="javascript:hideOverlay()">Close</a>
    </body>

    What I need now, is to know, how I can close bla.php from within bla.php.
    I want to be able to click a link, and then have the parent frame execute hideOverlay to remove the frame.
    I tried parent.hideOverlay() but it didn't work.

    Any help would be greatly appreciated.

    Thank you!

  2. #2
    Join Date
    Apr 2008
    Posts
    157
    Ah, I just found out something.
    When I open the bla.php directly in the overlay, and then click on the link, it works.

    But it doesn't really help me:
    First, I open the overlay with a quiz inside (flash). When one is done, you'll be redirected to thanks.php (in my example, it's bla.php). Then, if you click a link in thanks.php, the frame disappears.

  3. #3
    Join Date
    Apr 2008
    Posts
    157
    Never mind, I worked it out. The flash file changed to https:// instead of http://, so that was the mistake.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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