473,408 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Bust out of iframe

If a link is targeted to an iframe, can the linked page do anything to NOT
appear in the iframe? My efforts to make the linked page pop up a window or
an alert outside of the iframe aren't working.

TIA
Jul 20 '05 #1
4 12120
boyscout wrote on 21 okt 2003 in comp.lang.javascript:
If a link is targeted to an iframe, can the linked page do anything to
NOT appear in the iframe? My efforts to make the linked page pop up a
window or an alert outside of the iframe aren't working.


<a href=".." target="_top">..</a>

or

<script>
top.location.href="..."
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #2
In article <Xn********************@194.109.133.29>,
ex**************@interxnl.net enlightened us with...
boyscout wrote on 21 okt 2003 in comp.lang.javascript:
If a link is targeted to an iframe, can the linked page do anything to
NOT appear in the iframe? My efforts to make the linked page pop up a
window or an alert outside of the iframe aren't working.


<a href=".." target="_top">..</a>

or

<script>
top.location.href="..."

Won't that change the page location? Nor sure if the OP wants to
overwrite the page or open a new window...

Try using "_new" in links as the target if you want a brand new window
or using window.open in script.
-------------------------------------------------
~kaeli~
Jesus saves, Allah protects, and Cthulhu
thinks you'd make a nice sandwich.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
-------------------------------------------------
Jul 20 '05 #3
"boyscout" <no****@nospam.com> writes:
If a link is targeted to an iframe, can the linked page do anything to NOT
appear in the iframe?
No. *After* the page has appeared in the iframe (or at least a little
of it has appeared), it can try breaking out.
My efforts to make the linked page pop up a window or an alert
outside of the iframe aren't working.


I think something else is wrong. Alerts and popups are created by the
browser, and are typically not constrained to the frame that opened
them.

How is it failing? Are you getting any Javascript errors for the code
in the iframe? Are you sure the page is being loaded at all?

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #4
kaeli <in********************@NOSPAMatt.net> writes:
Try using "_new" in links as the target if you want a brand new window
The string "_new" has no special meaning to browsers. There is no
difference between using "_new", "new" or "arglebargle", it is just
the name of the new window. A second link with the same target will
open in the same window.

To get a new window for every time the link is clicked, use the target
"_blank".

The "special" names are "_blank", "_self", "_top", and "_parent". In
fact, a browser that adheres strictly to the HTML specification must
ignore any other target name starting with an underscore, so the
target name "_new" would be equivalent to no target. Browsers rarely
follow the HTML specification strictly.

<URL:http://www.w3.org/TR/html4/types.html#h-6.16>
or using window.open in script.


The target names for window.open (the second argument) follow the
same rules as HTML target names.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #5

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

Similar topics

57
by: John Howard | last post by:
I've sent several messages over the last year asking about python - Who teaches python? Is python losing steam? etc. I have noticed, eg, the declinng number of books at my local borders. The last...
2
by: Csaba2000 | last post by:
I want to be able to embed a single quote into an INPUT element within a dynamically generated IFRAME. The example below shows how the IFRAME is generated. Challenge: I'd like the alert box to...
4
by: Thomas | last post by:
Hi there, I have an iframe which is editable (designMode = "on") and want to resize it dynamically as the content grows (e.g. more lines of text is in there) and there the struggle starts. I...
2
by: Templar | last post by:
Hi i'm bothering with such problem... I must dynamic create an Iframe, and then put som raw HTML into it. But I can't. When I create iframe, I can't access its properties. Here's the coe...
1
by: Martin | last post by:
There seems to be some strange behaviour when trying to get the scrollHeight and scrollTop of an iframe in IE6. I have tried several ways of getting these values when the iframe is written into...
7
by: Christopher J. Hahn | last post by:
I'm trying to use a script-generated form to submit to a script-generated iframe. The problem I'm running into is that the iframe is not assuming the name I assign it. IE6 on Win2000. FF1.0.2+...
0
by: tequilamala | last post by:
I have an Iframe in one of the pages i am developing... the iframe is suppose to scroll up and down and the links target the iframe. the problem is that the iframe scrolls side to side on internet...
1
by: Z1P2 | last post by:
I would like to gradually resize an iframe in an onmouseover event. I can easily do it with an image, but when I try to do it with an iframe, it doesn't do anything. So first of all, is it possible...
7
by: noob | last post by:
Hi all, I want to display advertising in iframe, but bust out of iframe if someone clicks on any of the links in there. Can u please help. I googled for it, but I am not sure about the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
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...
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,...
0
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...

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.