|
-
Mar 9th, 2001, 01:13 AM
#1
Thread Starter
New Member
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...
-
Mar 11th, 2001, 06:57 AM
#2
Thread Starter
New Member
-
Mar 11th, 2001, 07:10 AM
#3
so you were the one from BoredTechs.. pretty cool site mate.. I'm Volcano
-
Mar 11th, 2001, 09:53 PM
#4
Thread Starter
New Member
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...
-
Mar 12th, 2001, 01:13 AM
#5
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
-
Mar 14th, 2001, 11:30 PM
#6
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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|