codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:



Home » HTML » Article

_Parent _self _blank _top Frame Specifications

Article by:  Jeff Anderson  ( 1362 ) (3/25/2002)
Bookmark us now! Add to Favourites
Email a friend!Tell a friend
Summary: How to specify frames and how to break out of them using standard link tags.
Viewed: 176961 times Rating (114 votes): 
 3 out of 5
 Rate this Article  Read Comments  Post Comments




_Parent _self _blank _top Frame Target Specifications


Specifying the correct frame in your link tags seems one of the trickier aspects of HTML for beginners to get to grips with, but in fact it's not that difficult.

Calling specific frames

If you want a link to change the page in another frame (for example in our frame navigation tutorial we had a left hand navigation frame which changes the right hand content frame), you need to give each frame its own name, and then specify that name in the link. Here's how the frameset might appear:

<HTML>
<HEAD><TITLE>My First Frame Page</TITLE>
</HEAD>

<FRAMESET COLS="25%,75%">
<FRAME NAME="navigation" SRC="navigation_page.htm">
<FRAME NAME="content" SRC="content_page.htm">
</FRAMESET>
</HTML>


Each of our two frame pages has it's own NAME attribute. Now here is the code for a link within the navigation frame which causes a new page to load within the content pain:
<a href="new_content.htm" target="content">New Content Page Link Text</a>


The target attribute is what does the trick here. It tells the browser that the frame labelled 'content' should be loaded with the new page "new_content.htm".

Using target="_top"

target="_top" within a link tag causes the new page to load in the full body of the window, which is useful if you ever want to break out of the frameset you have created and have a frameless page.

Using target="_parent"

target="_parent" is similar to target="_top" but will refer to the immediate parent of a frame. In more advanced frame usage there may be several nested frames and this allows more control over which frames are specified. (It's actually something developers rarely need to use).

Using target="_blank"

target="_blank" causes the link to open in a totally new browser window, leaving the page with the refering link still open behind it. Unlike Javascript pop ups, however, the developer has no control over the size of the resulting window - it just depends what the browser happened to do the last time they shut their browser down!

Using target="_self"

target="_self" loads the page within the same frame as the link tag.







CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums
Rate this article:     Poor Excellent
View highlighted Comments
User Comments on '_Parent _self _blank _top Frame Specifications '
Posted by :  Archive Import (pox) at 05:22 on Monday, February 17, 2003
frame navigation page doesnt load,,sort it man
Posted by :  Archive Import (heywood099) at 15:42 on Tuesday, February 18, 2003
good , it helped
Posted by :  Archive Import (Leigh) at 11:00 on Monday, March 31, 2003
I've created a site using frames and I'm looking to control the "mainFrame" from the "bottomFrame" navigation. I want the "bottomFrame" navigation "totop" button to bring you to the top of the "mainFrame" frame (which scrolls depending how long the content is).

Keep in mind that the content changes in the "mainFrame" so I can't direct it to a url but rather I want to direct it to go to top of the
"mainFrame".

Any suggestions on how to script? javascript?
Posted by :  Archive Import (Dude) at 19:32 on Friday, May 09, 2003
How do you place an image behind the inline frame and make links that go into it? Using only one image? So I need an image map, right
Posted by :  Archive Import (Collette ) at 17:40 on Saturday, May 10, 2003
In answer to Leigh's question--
use an anchor.

At the top of the html document that your frameset calls ("page.html",) add an anchor:
<.a name="totop"><./a>
(take out the dots)

Then change the link in your "bottomFrame" to something like:
<.a href="page.html#totop" target="mainFrame">To Top<./a>

It may be too late to help you, perhaps someone else may need this answer.
Collette McNeill
McNeill/Lynner WebWorks
<a href="http://www.mlwebworks.com">http://www.mlwebworks.com</a>
Posted by :  Archive Import (don schlilling) at 17:20 on Monday, June 09, 2003
Do you know of a way to to use the target command inside a meta refresh? So I could redirect a user to an entire new frame set automaticly.
Thanks
Posted by :  shawnmyers at 10:00 on Friday, October 17, 2003
In a nested frame how would you code so that a new linked url wipes out the frames and takes over the whole browser? That is I done want the address bar to have http://***.com/myindex.html with a new page in one of my frames I want the window to only have a new url and page like http://www.codetoad.com/
Posted by :  asiastar at 11:18 on Sunday, May 01, 2005
hello, I'm trying to get linked URL's to open from one Browser window into another.

from the main browser I have serveral slide shows links. so when I click on them now they will open a new:"blank" each time.

filling up the screen with browsers,

How can I tell the main browser to use the same "Blank" that it had just made for the last slide show." ?

You can go to the site to see what I mean. its a flash site so I hope you have it installed. You will need to click the first film strip to see a gallery. click one of the images to open a slide show.


http://www.fultonstudio.com/fl/main.html

Thanks for your help.
Posted by :  goitalone at 00:11 on Thursday, November 23, 2006
can someone please help me get this straightend out? :(

I am putting this online bible up and I have the it all set up right cept for I cant

figure out how to get the bible verses, chapters etc, to load into the second frame..

so far I have only been able to get it to go into a new window and in its own frame.

take a look at my souce here please and help me figure it out...driving me nuts..I spent

all day trying to get it right :(

thanks,


new member and iframes script newbie




<Added>

oops...the url is here:

http://bible.infotipper.com/frames.html


it also has a chat screen if you want, leave me a message in there if ya want!!


thanks
Posted by :  skier at 05:30 on Saturday, November 10, 2007
I am using a single <iframe> on the bottom of mainpage.asp to display searching tools contained on searchpage.asp. Once I have located the record using searchpage.asp, I am using a redirect in searchpage.asp to send the control back to mainpage.asp. The problem is: When it returns to mainpage.asp, it draws it inside the iframe of the original mainpage.asp.

I have tried using the following in the searchpage.asp, but have not been able to make the mainpage.asp display without the iframe.

reponse.redirect("mainpage.asp target=_top") ' Also tried _parent and _blank

I have also tried forcing mainpage.asp to redraw using a similar redirect command within mainpage.asp, but I still get the iframe and a don't get a fresh page.


To post comments you need to become a member. If you are already a member, please log in .

 



RELATED ARTICLES
Image Submit Button
by Jeff Anderson
You can keep your forms from slipping into mundanity by substituting the default gray submit button to a colourful graphic of your choosing.
Parent _self _blank and _top Frame Target Specifications
by Jeff Anderson
How to specify frames and how to break out of them using standard link tags.
Pre Tag
by Jeff Anderson
No need to reformat text files with line breaks and tabs if you use the pre tag
Image Rollovers
by Jeff Anderson
A bit of code to swap to different images on the page. You often see this on sites to display a rollover on the navigation buttons.
ASCII characters and their codes
by Jeff Anderson
A full list of all the ASCII characters.
In-Line Frames (IFrames)
by Jeff Anderson
Inline frames or IFrames are the ones which appear in the midst of a standard page, but actually reference a totally separate url.
Validate Date
by Kannadasan Ramiah
Validating Date entered in a text box, pure HTML page
HTML Hspace and Vspace Image Borders
by Jeff Anderson
A lesser known feature in HTML is the ability to add a blank border around images both horizontally and vertically.
Creating Navigation with Frames
by Jeff Anderson
The most popular use of frames is to allow a static navigation to stay on one part of the screen (in one frame) while the content changes in another.
The OSI Reference Model - A Clear and Concise Illustration !
by James Opiko
The OSI Reference Model - A Resource For IT Certification Candidates & Networking Professionals








Recent Forum Threads
• matrix prblm in java
• Re: how to open instantly a pop up window whenever a user sends a message to the other user
• Re: PING PROGRAM IN PERL
• Re: date of birth validation using java script-very urgent
• JAVA If statements
• Need Help with a Regular Expression
• Informations on HTML
• Re: FREE TV on your PC!
• Re: Using Lucene or Solr ?


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010