If I try to put a site into an iframe that has "escape frame" code in
its source (posted below), it will reload the requested page into the
parent instead of the iframe. Is there a way to prevent this from
happening?
One could use onunload to stop the redirection, but I would like to
find a way to load a page into an iframe, even if it has this type of
code.
I have considered server code loading the content and re-displaying it
but I would like to find a pre javascript solution.
//this is not my code
if (self != top) {
if (document.image s) {
top.location.re place(window.lo cation.href);
} else {
top.location.hr ef = window.location .href;
}
}
BTW: This is not with malicious intent...
- JS 3 3670
jshanman wrote: If I try to put a site into an iframe that has "escape frame" code in its source (posted below), it will reload the requested page into the parent instead of the iframe. Is there a way to prevent this from happening?
No. Otherwise there wouldn't be a lot of point in the author having the
frame escape code.
--
David Dorward <http://blog.dorward.me .uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
jshanman said the following on 4/27/2006 11:42 AM: If I try to put a site into an iframe that has "escape frame" code in its source (posted below), it will reload the requested page into the parent instead of the iframe. Is there a way to prevent this from happening?
Yes, you stop trying to Frame other peoples pages in your own page and
you don't have a problem anymore.
One could use onunload to stop the redirection, but I would like to find a way to load a page into an iframe, even if it has this type of code.
You think you can use onunload? Try again.
I have considered server code loading the content and re-displaying it but I would like to find a pre javascript solution.
Go server code. Client side isn't going to happen.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Randy Webb wrote: jshanman said the following on 4/27/2006 11:42 AM: If I try to put a site into an iframe that has "escape frame" code in its source (posted below), it will reload the requested page into the parent instead of the iframe. Is there a way to prevent this from happening?
Yes, you stop trying to Frame other peoples pages in your own page and you don't have a problem anymore.
One could use onunload to stop the redirection, but I would like to find a way to load a page into an iframe, even if it has this type of code.
You think you can use onunload? Try again.
I have considered server code loading the content and re-displaying it but I would like to find a pre javascript solution.
Go server code. Client side isn't going to happen.
-- Randy comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Thats what I thought.
FYI: This actually isn't something that I would ever do for myself, a
freelance project was posted with this as one of the requirements. I
was fairly sure it was impossible (using only javascript/iFrames), but
now I'm 100% sure! Thanks!
- JS http://www.endeavorpub.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jay |
last post by:
I'm trying to refresh browser when some new information is available in DB.
is there any way to force to refresh browser?
Thanks.
-Kev
|
by: joaopedrogoncalves |
last post by:
Hi,
I want to load an external javascript file, get its results and stick
them inside a <div> block. I also
want to do this in several places on a web page.
This way the browser doesn't have to wait for the external resource to
load to show up the page,
thus giving a perceiving faster load time for the user.
|
by: Robert de Ridder |
last post by:
I use an asp page to display pages, where the dynamic content is in an
iframe.
To calculate the height of the iframe I use the calcheight function. However
when trying to do this with external pages, I get an access denied error,
and the iframe won't display correctly.
Is there a way to solve this or another way to calculate the height for the
iframe.
The relevant code displayed below.
Thanks in advance for any help,
|
by: ej1002 |
last post by:
Hi
I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C# Web Form).
Is there any other method through which I will be able to access the IFrame Source of the page I am navigating to. Also I need to click on some of the links in the page I am navigating. Requirement is to read the data the IFrame source...
|
by: Jeronimo Bertran |
last post by:
I have a DataGrid that gets filled based on a filter which is defined by
the values that the user selects on several controls. When the page
postbacks after changing the selection on the filter controls, the DataGrid
refreshes itslef. Now, I also need to refresh the DataGrid if I detect
that something "external" has changed (keeping the filter that the user is
using).
For this, I have created a page that partially refreshes itslef in...
| |
by: dd |
last post by:
I have a situation where the browser memory goes up and up
as each Ajax call causes new content to be deployed into a
DIV. I'd like to know if I can force garbage collection to occur.
More detail:
My code is loaded in an iframe which is in a div. The parent
page looks like this (my code is in firstiframe.html):
<div id="main div">
|
by: althafexcel |
last post by:
hi everyone
Im trying to include an external js in my aspx page under the head
tag, it doesn't load or it displays an object expected error whenver
the function from the .js is called. Actually for repeated html im
using the external js, i mean the TOP, BOTTOM they are repeated in
every page, so i include them as functions in the external js and call
them. Why it doesn't work?
|
by: eddy.pagotto |
last post by:
Hi,
I'm trying to display external link into a DIV (http://
www.google.com/, for example).
I don't want to use IFRAME, because I already tried it and I'm not
satisfied about the results.
How can I simulate IFRAME? Possibly without using Ajax.
I passed all the day looking for scripts that can help me, but
unsuccessfully.
Thanks in advance for any suggestion,
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
| |
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |