473,473 Members | 1,807 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Block a particular if statement in an iframe?

So here's the situation. I have a page with an IFRAME. I load into
that IFRAME a particular website (it's actually GMAIL.) However, my
site disappears, and gmail becomes the new webpage. one of the firs
few lines are:

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

I believe that my problem. Any way around it?

May 3 '07 #1
2 1449
si************@gmail.com said the following on 5/3/2007 5:31 PM:
So here's the situation. I have a page with an IFRAME. I load into
that IFRAME a particular website (it's actually GMAIL.) However, my
site disappears, and gmail becomes the new webpage. one of the firs
few lines are:

if (top.location != self.location) {
top.location = self.location.href;
}
It is called "frame busting code".
I believe that my problem.
No, it only points to the problem.
Any way around it?
Yes, stop trying to display other websites content on your website and
the "problem" goes away.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
May 3 '07 #2
On May 3, 10:31 pm, simpleinven...@gmail.com wrote:
So here's the situation. I have a page with an IFRAME. I load into
that IFRAME a particular website (it's actually GMAIL.) However, my
site disappears, and gmail becomes the new webpage. one of the firs
few lines are:

if (top.location != self.location) {
top.location = self.location.href;

}

I believe that my problem. Any way around it?
1. proxy the code removing the offending lines.
2. write a gadget that uses the google api.
similar to http://www.google.com/a/

May 3 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
4
by: la_haine | last post by:
I have a collection of pages that are designed to be called into an iframe (named displayView), and the managers don't want people to be able to view them unless they're in that iframe. If I use...
17
by: Paul | last post by:
HI! I get an error with this code. <SCRIPT language="JavaScript"> If (ifp==""){ ifp="default.htm"} //--></SCRIPT> Basicly I want my iframe to have a default page if the user enters in...
3
by: deko | last post by:
Problem: why doesn't this With block work? is it possible to have a For Each loop within a With block? With objWord .Documents.Add Template:=strTemplate, NewTemplate:=False, DocumentType:=0...
18
by: Minti | last post by:
I was reading some text and I came across the following snippet switch('5') { int x = 123; case '5': printf("The value of x %d\n", x); break; }
8
by: Andrew Robinson | last post by:
Are these two equivalent? Is one better than the other? I tend to go with #1 but started wondering.... Thanks, 1: using (SqlConnection cn = new SqlConnection(DataConnection)) using...
1
by: morrell | last post by:
Hi all Is there any chance you can check if a fo:block with an id of "Tips" contains any data. The problem I'm having is creating a fo:block then for-each node within one part of the xml I'm...
12
by: reycri | last post by:
While the following is allowed: if (a == b) SomeFunction(); else OtherFunction(); The following is not: try
3
by: Chandra | last post by:
Hi All, I have 2 htmls with one being referred in iframe of the other. The iframe html has style display = block and none set in the javascript. however this makes the block go behind the parent...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.