Forum Moderators: open

Message Too Old, No Replies

When to use target='_top' in an href link?

         

peterinwa

3:35 am on Feb 25, 2003 (gmt 0)

10+ Year Member



I long time ago I had some problems moving between pages and the answer was to include target='_top' in the href link. I now have them in many of my links but can't remember exactly why or where I need them.

Perhaps the problem was when you would exit the "child" of a FRAMES page and go to another page. Then the link back needed target='_top' to keep you from going back directly to the child. target='_top' took you to the parent which would be correct.

If that's right, I'm not using them properly now because I have them in links leaving FRAMES pages and going to non-FRAMES pages.

Thanks! Peter

MWpro

4:15 am on Feb 25, 2003 (gmt 0)

10+ Year Member



From what I recall, target="_top" is used when you are linking from a frames page to another page... For example, say you had a frame layout with the menu frame on the left called 'left' and the content frame on the right called 'content'. If you wanted a link to appear in the content frame, you would target it as content... but if you wanted the new link (located in left) to take the entire browser window up you would target it as "_top" or else the default target would be left and it would just load in the menu bar.

malckam

5:49 pm on Feb 25, 2003 (gmt 0)

10+ Year Member



Target='_top' will load the entire current browser window with the url specified in the link. (Effectively removing the frameset page.)

DrDoc

10:33 pm on Feb 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...took you to the parent which would be correct

That's what target="_parent" does ;)

Target:
_blank = Link will open in new window
_top = Link will clear any existing frames and open URL as the uppermost document
_parent = Link will open in parent frame (if several levels deep). Equal to _top if only one level frameset
_self = Link will open in current frame/window etc, whichever is applicable