View Full Version : IFrame link
theRealAirness
07-10-2005, 08:19 AM
I have an iframe from TryItOn.aspx called iFrameTryItOn. There are links in the IFrames. It goes back to TryItOn.aspx. Unfortunately, it opens the the page inside the IFrame. Is there a way around?
chump2877
07-10-2005, 12:59 PM
don't use an iframe, use some CSS to look like an iframe.....
then when you click a link inside the pseudo "iframe", the link will refresh the whole page, not just the "iframe" window....
Like this: http://www.citrusmoon.net/miscitems/mimic/this2.html.
Or something like parent.location.href="TryItOn.aspx" unless you are wanting a new window?
theRealAirness
07-10-2005, 06:31 PM
I don't know that you can do that in css. Is it hard to do? Do you have a sample code? I don't know where to begin. I'll try to find one.
I'm going to try parent.location.href too.
mark87
07-10-2005, 06:59 PM
Why not use -
<a href="link.html" target="_top">Link</a>
... no need for CSS/Javascript.
You can also use "_parent" to go to the immediate parent of the iFrame.
theRealAirness
07-10-2005, 08:19 PM
I tried _parent, _top, and _search. It does not work.
mark87
07-10-2005, 08:33 PM
My mistake, I think targetting is only for frames, not iFrames.
You will need javascript then as Mr J said.
<a href="#" onclick="window.location.href='yourpage.html'">
<a href="#null" onclick="parent.location.href='yourpage.htm'">CLICK</a>
Or
<a href="yourpage.htm" target="_top">CLICK</a>
Both the above work
theRealAirness
07-10-2005, 09:41 PM
It works. Thanks guys.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.