Results 1 to 6 of 6

Thread: Frames Page Questions

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    HondaForums.com
    Posts
    11
    This is a frames page question.
    The following code tells the browser that if this individual frame page is not loaded within a frame then it is to be redirected to said website. What this prevents is your framed pages getting loaded to _top.

    <script>
    if (parent.location.href == self.location.href){
    // change the url below to the url of the
    // frameset page...
    window.location.href = 'http://www.boredtechs.com'
    }
    </script>
    My question is. I need code that works the other way around. If my page gets loaded in to a frame I want it to automatically jump to _top. Meaning burst out of the frame and load full browser. This is to prevent a page being loaded in to a frame.
    Thanks in advance...

  2. #2

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    HondaForums.com
    Posts
    11
    Cool, thanks...

  3. #3
    Guest
    so you were the one from BoredTechs.. pretty cool site mate.. I'm Volcano

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Location
    HondaForums.com
    Posts
    11

    That was me...

    Yep, that was me...
    Thanks for stopping by. I hope we can make a great site that will be really helpful for people as well as a place they enjoy coming back to to just hang out.
    What do you specialize in with computers? Or are you just an average user that is into many things like me?
    Talk to you later...

  5. #5
    Guest
    i'm just an average user like you... just programming for fun when bored with all those school work.. anyway nice site.. it will be great when a lot of others will join in..

    we'll make an effort

  6. #6
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    this is a more generic use that doesn't require changing for any page you put it in(no constants), thus you can use it in an included file.
    Code:
    <SCRIPT LANGUAGE="JavaScript">
        function checkParent() {
        if (parent != self)
           top.location.href = self.location.href
    	}
    </SCRIPT>
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

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



Click Here to Expand Forum to Full Width