J
jshanman
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.images) {
top.location.replace(window.location.href);
} else {
top.location.href = window.location.href;
}
}
BTW: This is not with malicious intent...
- JS
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.images) {
top.location.replace(window.location.href);
} else {
top.location.href = window.location.href;
}
}
BTW: This is not with malicious intent...
- JS