Results 1 to 2 of 2

Thread: Closing an HTML frameset, returning to standard (non-frameset) HTML

  1. #1
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb Closing an HTML frameset, returning to standard (non-frameset) HTML

    We want to navigate between framesets and non-framesets in a website, without leaving a lot of stranded parents OR children. A solution should work for all browsers (or at least for Firefox and Chrome; IE would be nice, but we've lost faith).

    Two cases are considered:

    (1) An HTML frameset (A) invokes a child HTML frameset (B). The child frameset (B) is to close, returning to the parent (A). This works; (B) disappears and (A) remains.

    A clue was found: use top.close() target="TOP" upon exiting the child.

    (2) A simple non-frames HTML page (C) invokes a child HTML frameset (D). The child frameset (D) is to close, returning to the parent (C). This doesn't work! The result is that the parent disappears and the child remains.

    We attempted to use top.close() in the child, but it fails.

    Most discussions are based on using a popup window or a form. These are neither. We have found references stating that this problem cannot be solved, yet we've solved it in the first case EXCEPT that it only works in Firefox and Mozilla. (Chrome fails utterly, and IE renders so poorly that we'd have to redesign the whole page for the solution to work properly.)

    We'd be happy to provide code fragments, but as we're dealing with framesets the 'fragments' are pretty extensive.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This is no longer an entirely HTML question once you start using things like:

    top.close()
    That's javascript. And generally javascript cannot close() anything that wasn't opened using the javascript open() method. This may or may not be a factor in one or more of the scenarios you describe in one or more of the browsers you're testing in.

    It's possible that it could be all HTML though. If everything you are trying to do happens when you click on a link that loads a page (frameset or single page) and you just want that to take over the current tab or window:

    HTML Code:
    <a href="whatever.htm" target="_top">Whatever</a>
    will do the trick, no javascript required.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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