•
•
•
•
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
![]() |
| |
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 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.
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 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?
.
•
•
Join Date: Dec 2007
Posts: 34
Reputation:
Rep Power: 1
Solved Threads: 1
Hadn't used IFRAMEs for a while and forgot about having to use _target. Really messed me up!
Useful reminder.
Useful reminder.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Dynamic iframe height (JavaScript / DHTML / AJAX)
- iframe height (HTML and CSS)
- iframe help (HTML and CSS)
- Ads sometimes duplicate/double.. (DaniWeb Community Feedback)
- mozilla & dynamic width iframe (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: Rich Text Box Code
- Next Thread: HTML code in accessing webpage via mobile phone




Hybrid Mode