Log in

View Full Version : iframe



mstolton
07-04-2008, 06:42 PM
Hi

Is there a way to have a hyperlink within an iframe open in that window and not within the iframe. Sorry if this question is a bit simple. :)

Cheers

Nile
07-04-2008, 06:44 PM
http://www.dynamicdrive.com/dynamicindex17/iframessi2.htm

mstolton
07-04-2008, 06:58 PM
This script still loads the content within the iframe? Is there a way to change the page outside the borders of the iframe?

For example if an iframe had a hyperlink to google.com within it. I want it so that when that link is clicked, the entire page reloads showing just google.com

traq
07-04-2008, 07:17 PM
make your link like so:
<a href="http://www.google.com" target="_top">Google</a>

mstolton
07-04-2008, 07:33 PM
Thanks your a legend!

mstolton
07-05-2008, 12:11 PM
Hi

Can the code below, for the iframe itself be modified to allow all hyperlinks within it to open the page outside of the iframe's borders, rather than having to modify each individual hyperlink:

<iframe src="http://www.google.com"
width="600" height="600" marginwidth="0" marginheight="0"
hspace="0" vspace="0" frameborder="0" scrolling=no>
</iframe>

magicyte
07-08-2008, 12:48 AM
No. It is impossible to do with Google. The only way to do that would be with any .html page that has a stylesheet attached with a { target:_top; } in a style tag.

-magicyte