Showing posts with label Window. Show all posts
Showing posts with label Window. Show all posts

Monday, March 9, 2009

Use HTML to open a link in a new window

_Parent _self _blank _top Frame Specifications

<a href=”http://www.google.com” target=”_blank”>Google</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 "www.google.com".

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.