Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Way to Redirect Framed Page???

Reply
Thread Tools

Way to Redirect Framed Page???

 
 
DiLu790
Guest
Posts: n/a
 
      12-14-2003
Hello, someone's framed one of my pages within their site. Although it may very
well be a compliment, I don't like it considering the possible repercussions it
may have on my great rankings at Google.

I dug up the following which DOES work:

<script language="Javascript">
<!-- hide this from non JavaScript Browsers
if (window.location != top.location)
{top.location.href=window.location}
// -->
</script>

But might there be a way to redirect the page to a different page (which in my
case would be a blank page) if it's being framed? Or is that impossible?

 
Reply With Quote
 
 
 
 
Cameron
Guest
Posts: n/a
 
      12-14-2003
DiLu790 wrote:
> Hello, someone's framed one of my pages within their site. Although it may very
> well be a compliment, I don't like it considering the possible repercussions it
> may have on my great rankings at Google.
>
> I dug up the following which DOES work:
>
> <script language="Javascript">
> <!-- hide this from non JavaScript Browsers
> if (window.location != top.location)
> {top.location.href=window.location}
> // -->
> </script>
>
> But might there be a way to redirect the page to a different page (which in my
> case would be a blank page) if it's being framed? Or is that impossible?
>


not sure if this will do what you want but you can put a meta tag to
redirect in the <head> section of the page, this may just reload inside
the frame, I aren't sure about that, never use frames can't stand the
pesky little creatures.

<META http-equiv="refresh" content="3;URL=http://www.foo.com/bar/index.htm">


Hope that's correct, haven't used it manually for a long time.

that will redirect them to http://www.foo.com/bar/index.htm in 3
seconds, but be warned that all browsers may not honor the redirect,
either by user preference or design, they SHOULD but just in case you
should put a link as well like

<a href="http://www.foo.com/bar/index.htm">If you are not redirected in
3 seconds click here</a>

~Cameron

 
Reply With Quote
 
 
 
 
Sid Ismail
Guest
Posts: n/a
 
      12-14-2003
On 14 Dec 2003 21:51:37 GMT, http://www.velocityreviews.com/forums/(E-Mail Removed) (DiLu790) wrote:

: <script language="Javascript">
: <!-- hide this from non JavaScript Browsers
: if (window.location != top.location)
: {top.location.href=window.location}
: // -->
: </script>
:
: But might there be a way to redirect the page to a different page (which in my
: case would be a blank page) if it's being framed? Or is that impossible?


If framed, redirect them to a porn site... if I were you. Swines.

Sid

 
Reply With Quote
 
Andrew Graham
Guest
Posts: n/a
 
      12-14-2003
DiLu790 wrote:
> Hello, someone's framed one of my pages within their site. Although
> it may very well be a compliment, I don't like it considering the
> possible repercussions it may have on my great rankings at Google.
>
> I dug up the following which DOES work:
>
> <script language="Javascript">
> <!-- hide this from non JavaScript Browsers
> if (window.location != top.location)
> {top.location.href=window.location}
> // -->
> </script>
>
> But might there be a way to redirect the page to a different page
> (which in my case would be a blank page) if it's being framed? Or is
> that impossible?


<script type="text/javascript">
if (window.location != top.location) {
window.location = "blank.html";
}
</script>

Andrew Graham


 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      12-14-2003
On Sun, 14 Dec 2003 22:04:18 +0000, Cameron <(E-Mail Removed)>
wrote:

: not sure if this will do what you want but you can put a meta tag to
: redirect in the <head> section of the page, this may just reload inside
: the frame, I aren't sure about that, never use frames can't stand the
: pesky little creatures.
:
: <META http-equiv="refresh" content="3;URL=http://www.foo.com/bar/index.htm">


And have an endless loop ??

Sid

 
Reply With Quote
 
Cameron
Guest
Posts: n/a
 
      12-14-2003
Sid Ismail wrote:
> On Sun, 14 Dec 2003 22:04:18 +0000, Cameron <(E-Mail Removed)>
> wrote:
>
> : not sure if this will do what you want but you can put a meta tag to
> : redirect in the <head> section of the page, this may just reload inside
> : the frame, I aren't sure about that, never use frames can't stand the
> : pesky little creatures.
> :
> : <META http-equiv="refresh" content="3;URL=http://www.foo.com/bar/index.htm">
>
>
> And have an endless loop ??
>
> Sid
>


Wasn't really 100% sure what was being asked, I never use frames, if I
need e.g. a constant set of links down the left hand side I just layout
a global page template and use PHP's include function to do so, also
never learned javascript because I prefer things to be done at the
server for compatibility reasons, Lynx still exists ya know , so I was
just offering what I could, not a definite this will work method.

~Cameron

 
Reply With Quote
 
DiLu790
Guest
Posts: n/a
 
      12-14-2003
Wow!

That worked perfectly!

Thanks a bunch Andrew.
 
Reply With Quote
 
Toby A Inkster
Guest
Posts: n/a
 
      12-14-2003
Cameron wrote:

> Sid Ismail wrote:
>
>> On Sun, 14 Dec 2003 22:04:18 +0000, Cameron
>> <(E-Mail Removed)> wrote:
>>
>>: <META http-equiv="refresh"
>>: content="3;URL=http://www.foo.com/bar/index.htm">
>>
>> And have an endless loop ??

>
> never learned javascript because I prefer things to be done at the
> server for compatibility reasons, Lynx still exists ya know ,


Although to clarify, Lynx does support meta refresh.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me - http://www.goddamn.co.uk/tobyink/?page=132

 
Reply With Quote
 
DiLu790
Guest
Posts: n/a
 
      12-14-2003
Hey Sid,

yah, I know what you mean...and I AM Tempted, but not sure if this person(s)
meant it as a compliment or to cause trouble.

thus, I think I'll take the gracious route.

Thanks for your input.
 
Reply With Quote
 
Sid Ismail
Guest
Posts: n/a
 
      12-15-2003
On 14 Dec 2003 23:30:39 GMT, (E-Mail Removed) (DiLu790) wrote:

: Hey Sid,
:
: yah, I know what you mean...and I AM Tempted, but not sure if this person(s)
: meant it as a compliment or to cause trouble.
:
: thus, I think I'll take the gracious route.


LOL - you're a gentleman.

Sid

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
__doPostBack and Response.direct not working in non-framed pages. =?Utf-8?B?Q2xhcw==?= ASP .Net 0 11-10-2005 01:35 PM
servlet help - redirecting from within a framed servlet ppcguy Java 1 08-08-2005 03:03 PM
help read URL from framed JSP Chumpmeister Java 2 05-29-2004 10:08 AM
Basic Q - Response.Redirect, all redirect to first Response.Redirect statement Sal ASP .Net Web Controls 1 05-15-2004 03:46 PM
Sessions when using Framed web site? =?Utf-8?B?Q2hyaXN0b3BoZXI=?= ASP .Net 1 01-26-2004 12:35 AM



Advertisments