SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'locked' in frameset and no window.close()

    My site is stored on personal website which my url-forwarding points to when visitors go to my domain.

    The web-forwarding of my registrars use url-masking (aka gripping aka...) which they do by placing my actual page within their own frameset (100%,*) and then allowing all internal links to replace only 'contents' of that frame (not the frameset itself (top, parent))

    I have the main body of the site appear in a centred pop-up while the index page is shrunk and forwarded (meta refresh) to a 'thank you/relaunch/close' page.

    Problem is with the thank you/.. page- the 'close window' button just will not work.

    I have tried every possible permutation of the window.close command (parent, self, top, ...) and none of them will do the trick.

    The source of the top page (their page.frameset) doesn't contain any javascript, so I'm left wondering why it's not working.

    The only unusual thing I noticed was that the <frameset> and <frame src...> (pointing to my webspace) tags are *outside* the <body> </body> tags.
    The only <body> content in the source is within the <noframes> tags.


    It works fine when I force the contents of the frame (my index) into a new window of its own, just not when its inside their frameset

    Is there some way I can have a window.close button without using javascript?

    I tried having a 'break out of frames' script (several copy/paste variations) as an onload script in there too, but even that would not work within this frameset.

    I'm stumped.

    Anyone?
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  2. #2
    We like music. weirdbeardmt's Avatar
    Join Date
    May 2001
    Location
    Channel Islands Girth: Footlong
    Posts
    5,882
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The first thing is that the frameset *should* be outside of the <BODY> tags.

    The closing window thing, well I had problems with this. When you do it, do you get a "Your browser is trying to close this window" alert message? Because I am fairly certain (and I tried a million and one different things to do this) it is impossible to close the main/parent window.

    The only thing you could try is using the window.referrer object and close the main window from within your popup, but I guess this defeats the purpose.
    I swear to drunk I'm not God.
    Matt's debating is not a crime
    Hint: Don't buy a stupid dwarf Clicky

  3. #3
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As far I know the 'Your browser is trying to close this window' message is a Windows thang.

    I'm on a Mac, so don't get that.

    I get no messages or alerts, it just doesn't work.

    As far as I know a frameset instruction doesn't have a proper 'right place' in relation to the <body> as a <body> isn't needed in a frameset.
    Of course, there is usually only a nominal body anyway as all the real content is supplied by the pages being loaded into the frames.
    Even so, the frameset can go between the closing <head> tag and the opening <body> tag and still function perfectly well.

    Logically speaking the only place the body tag doesn't belong is between frameset tags as this should only point to frame src information, right?


    Also, it is entirely possible to close a window from within a page in a frameset (within that window).
    I use it on some other sites and usually a simple self.close() will do it.

    This is why this is all so confusing
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature


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
  •