SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2002
    Location
    Switzerland
    Posts
    45
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    free page of frames

    Another page links to mywebsite. those page page has frames and now I want to make that my page detects if it was loaded into a frame. if yes it should reload on top (and free itself of that frame),
    where can I find a script for that? thanks a lot.

  2. #2
    ♪♪ ♪ ♪ ♪ ♪♪ ♪ ♪♪ Markdidj's Avatar
    Join Date
    Sep 2002
    Location
    Bournemouth, South UK
    Posts
    1,551
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    try this

    if (top.location !=self.location) {
    top.location.replace(self.location)}

    this will get you out of frames.
    the '!=' means not equal.
    LiveScript: Putting the "Live" Back into JavaScript
    if live output_as_javascript else output_as_html end if


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
  •