Forum Moderators: open

Message Too Old, No Replies

Iframes breaking out for external links

<Iframe>

         

nigel_c

9:57 pm on Dec 18, 2005 (gmt 0)

10+ Year Member



As you will see by viewing the code at <edited> I have a problem opening the iframe links in ideally target="_top" as I am not proficient in programming, just a keen amateur and do not have access to the page code in the frame.

Can anyone advise me how I can overcome the problem?

<Sorry, no personal URLs.
See Forum Charter [webmasterworld.com]>

[edited by: tedster at 10:27 pm (utc) on Dec. 18, 2005]

tedster

10:31 pm on Dec 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



do not have access to the page code in the frame

The target="_top" attribute is exactly what you need -- but it needs to be in the source code for the page that is inside the iframe. If you cannot access that source code, then you cannot open those links in a different fashion from the way they are already coded.

kaled

12:26 am on Dec 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You might be able to use the base object to set the default target for the page or you might be able to enumerate the links and rewrite the target.

with (top.aframe.document) {
for (var i=0; i<links.length; i++) {
links[i].target = "_top"
}}

Kaled.