The Wayback Machine - https://web.archive.org/web/20101026034428/http://www.webreference.com:80/html/tutorial14/6.html


spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / html / tutorials / 14 / 6

index1234567exercises1

Tutorial 14: You've been Framed, Part I

Developer News
Eclipse Helios Update Brings New PHP Tools
Internet Explorer 9 Ups Standards Support
JBoss Portal 5 Release Easier to Use

Using TARGET to create new browser windows

As an aside, I should note that TARGET can also be used to load the destination document of a hyperlink into a new browser window. By giving the TARGET attribute a value that is not an existing frame, you indicate that the browser should create a new window, and display the document in that window. If another link is followed that has the same TARGET value, it will be loaded in this window. This technique can be used to create Web pages that work across multiple windows. However, this technique is discouraged since (a) it depends on the user agent running on a graphical window system and (b) it takes control of the browser away from the user. All browsers have the option of viewing a document in a separate window, and it's best not to invade your user's workspace and allow him to choose when to open a new window. The technique is shown below:

<P>You can open <A HREF="http://www.webreference.com/html/"
TARGET="awindow">this link</A> in a new window, and any <A
HREF="http://www.webreference.com/html/watch/" 
TARGET="awindow">other links</A> that have the same 
target will be displayed in this window. You can 
open this window by clicking on either of the links 
above, but 
<A HREF="http://www.webreference.com/html/tutorials/">normal 
links</A>
will be displayed in the current window. <A
HREF="http://www.webreference.com/html/tools/"
TARGET="anotherwindow">Links with different targets</A> will be
displayed in a different window.</P>

You can open this link in a new window, and any other links that have the same target will be displayed in this window. You can open this window by clicking on either of the links above, but normal links will be displayed in the current window. Links with different targets will be displayed in a different window.

index1234567exercises1

webref The latest from WebReference.com Browse >
10 jQuery Tips and Tricks for Visual Studio · Create a Localized Web Page with PHP · Top 6 Related Posts Plugins for WordPress
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Introduction to SSIS Script Task · Small Business Marketing: Ads, Affiliates and Revenue · Amazon Q3 Profits, Revenue Beat the Street

URL: http://www.webreference.com/html/tutorial14/6.html

Produced by Stephanos Piperoglou
Created: June 30, 1999
Revised: June 30, 1999

Morty Proxy This is a proxified and sanitized view of the page, visit original site.