iframe issue with html/javascript

D

dmalhotr2001

I have a header and a footer iframe inside a page. What I would like
to do is when i click on a link inside either of the iframe, that it
open up inside the main page rather than the iframe itself. Is there
a way to do that?

Thanks

:D
 
T

Thomas 'PointedEars' Lahn

Stefan said:
from HTML: <a ... target="_parent"
from JS: window.parent.location.href = ...

To work around the SOP, only

window.parent.location = ...

as the `href' property is tainted. Scripting should be avoided here,
though.
Header and footer iframes? I don't know what kind of page you're working
on, but a server-side solution may work better for you (and your
visitors).

And/or block-level elements positioned fixed with CSS (and IE 6 workaround),
in which case none of the above would be necessary.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top