Be a Supporter!

Help with javascript!

  • 800 Views
  • 5 Replies
New Topic Respond to this Topic
nafs
nafs
  • Member since: Sep. 24, 2000
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Help with javascript! 2001-09-13 15:59:29 Reply

I need a script that overrides frames on a site and takes you to a new site in the same window...

OR

a script that auto popups a new site and closes the old one

Help apriciated

RichL
RichL
  • Member since: Apr. 2, 2000
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to Help with javascript! 2001-09-13 17:34:31 Reply

At 9/13/01 03:59 PM, Hannetz wrote: I need a script that overrides frames on a site and takes you to a new site in the same window...

OR

a script that auto popups a new site and closes the old one


Help apriciated

so you want like a page to check if the user is in frames..break out of those frames and then direct to the next page? You could just break out of frames on the actual page itself without having any other pages re-directing to it..that way whoever links to THAT certain page wont be able to put frames around it.

If thats want you need- i can type out the code for you, its very simple really.

Help with javascript!

nafs
nafs
  • Member since: Sep. 24, 2000
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Help with javascript! 2001-09-15 16:57:32 Reply

At 9/13/01 05:34 PM, RichL wrote:
so you want like a page to check if the user is in frames..break out of those frames and then direct to the next page? You could just break out of frames on the actual page itself without having any other pages re-directing to it..that way whoever links to THAT certain page wont be able to put frames around it.

If thats want you need- i can type out the code for you, its very simple really.

that is infact exactly what i want, im'a mail you about it, if you have a mail on your profile, which im going to look at now

nafs
nafs
  • Member since: Sep. 24, 2000
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Help with javascript! 2001-09-15 17:31:41 Reply

At 9/15/01 04:57 PM, Hannetz wrote:
At 9/13/01 05:34 PM, RichL wrote:
so you want like a page to check if the user is in frames..break out of those frames and then direct to the next page? You could just break out of frames on the actual page itself without having any other pages re-directing to it..that way whoever links to THAT certain page wont be able to put frames around it.

If thats want you need- i can type out the code for you, its very simple really.
that is infact exactly what i want, im'a mail you about it, if you have a mail on your profile, which im going to look at now

you're mailbox is full, so you'll have to mail me - or post the code here (if that works)cause your mailbox was full...

liljim
liljim
  • Member since: Dec. 16, 1999
  • Offline.
Forum Stats
Staff
Level 28
Blank Slate
Response to Help with javascript! 2001-09-16 09:40:32 Reply

At 9/13/01 03:59 PM, Hannetz wrote: I need a script that overrides frames on a site and takes you to a new site in the same window...

Put this between your <head> tags:

<SCRIPT LANGUAGE="JavaScript">
<!--

function ReLocate() {
if (self != top) {
top.location = self.location;
}
}

//-->
</SCRIPT>

And then in your body tag, add this:

onLoad="ReLocate();"

Should work. I think. ;)

nafs
nafs
  • Member since: Sep. 24, 2000
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to Help with javascript! 2001-09-16 17:51:54 Reply

At 9/16/01 09:40 AM, liljim wrote:
At 9/13/01 03:59 PM, Hannetz wrote: I need a script that overrides frames on a site and takes you to a new site in the same window...
Put this between your <head> tags:

<SCRIPT LANGUAGE="JavaScript">
<!--

function ReLocate() {
if (self != top) {
top.location = self.location;
}
}

//-->
</SCRIPT>

And then in your body tag, add this:

onLoad="ReLocate();"

Should work. I think. ;)

Thank you so much! i am in eternal debt to you! (just dont make me touch Dom-Price's ass)