User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 401,695 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,710 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 4080 | Replies: 7
Reply
Join Date: Aug 2005
Posts: 13
Reputation: fieryidris is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
fieryidris's Avatar
fieryidris fieryidris is offline Offline
Newbie Poster

how do i escape from an iframe?

  #1  
Oct 1st, 2005
i spent a lot of time yesterday redoing my whole website with iframes for each section but once
i put everything onto the server i found that the links inside the iframes opened inside the iframes rather than in the whole window. how do i escape from the iframe to open a link in the whole window or a new window?
i have just left an example iframe page at http://www.fieryidris.co.uk/iframe.htm so the problem can be seen.
i have a website and a blogand i have just uploaded a phpbb forum to play with.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 34
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: how do i escape from an iframe?

  #2  
Oct 1st, 2005
Research the "target" attribute of hyperlinks.
Reply With Quote  
Join Date: Sep 2005
Posts: 5
Reputation: shephunts is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
shephunts shephunts is offline Offline
Newbie Poster

Re: how do i escape from an iframe?

  #3  
Oct 1st, 2005
Should be target="_top"

That's how I fixed my problem like this.
Reply With Quote  
Join Date: Aug 2005
Posts: 13
Reputation: fieryidris is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
fieryidris's Avatar
fieryidris fieryidris is offline Offline
Newbie Poster

Re: how do i escape from an iframe?

  #4  
Oct 3rd, 2005
thanks shephunts for target="_top".
i ate some bad fish on saturday and i was already deteriorating when the iframes not doing what i expected finished me off.
i have now done some proper research on the different target commands and checked what happens when you use them in an iframe.

all these links below and the results are within an iframe

<a href="http://www.google.co.uk" target="_blank"> will open google in a new window

<a href="http://www.google.co.uk" target="_parent"> will open google in all of the current window

<a href="http://www.google.co.uk" target="_self"> will open google inside the iframe

<a href="http://www.google.co.uk" target="_top"> will open google in all of the current window

<a href="http://www.google.co.uk"> with no target command will open google inside the iframe

separately from this problem i had of escaping from the iframe i have also been emailed some screenshots by my sister of how the iframe page is being displayed in different browsers and it's not looking very good.
the border of the iframe is only showing on the right hand side and the bottom - i'm not sure if this is because i have got a black background as it seemed to work ok for me in internet explorer and firefox before when the background was red.
in netscape 4.7 the iframe is not displayed at all and the top of the page is just followed by the bottom. i know netscape is now 8.0 so 4.7 is very out of date but is this going to affect any other browsers and destroy the page layout making the iframe a bad idea?

.
i have a website and a blogand i have just uploaded a phpbb forum to play with.
Reply With Quote  
Join Date: Dec 2007
Posts: 1
Reputation: Pritam1984 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Pritam1984 Pritam1984 is offline Offline
Newbie Poster

Re: how do i escape from an iframe?

  #5  
Dec 19th, 2007
Thanks a lot. This thread helps me much.
Reply With Quote  
Join Date: Jan 2008
Location: India
Posts: 147
Reputation: sbv is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 6
sbv's Avatar
sbv sbv is offline Offline
Junior Poster

Re: how do i escape from an iframe?

  #6  
Jan 16th, 2008
Thanks. its useful to solve my problem also.
But instead of click on hyp link i need the same on Image click. Do you have any idea about it.?
Last edited by sbv : Jan 16th, 2008 at 4:42 am.
Reply With Quote  
Join Date: Dec 2007
Posts: 34
Reputation: sourcez is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
sourcez sourcez is offline Offline
Light Poster

Re: how do i escape from an iframe?

  #7  
Dec 23rd, 2007
Hadn't used IFRAMEs for a while and forgot about having to use _target. Really messed me up!

Useful reminder.
Reply With Quote  
Join Date: Oct 2007
Posts: 13
Reputation: kiwisites is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
kiwisites kiwisites is offline Offline
Newbie Poster

Solution Re: how do i escape from an iframe?

  #8  
Jan 17th, 2008
simple...
REPLACE:
<A href="link.htm">Hyper linked Text</a>
WITH
<a href="link.htm">
<IMG SRC="yourimage.jpg" border="0">
</a>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb HTML and CSS Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 8:10 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC