Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: Web
Expertise: Beginner
May 14, 1999



Application Security Testing: An Integral Part of DevOps

Open a Separate Child Browser Window Using JavaScript

You probably have seen some Web sites that automatically launch new windows in your browser to show an advertisement or an affiliated Web site. You can do this with the open method of the window object.
open(URL, WindowName, WindowFeatures)
If you specify a URL, the window will automatically open to that URL. WindowName allows you to specify which window to use. If you use a unique window name, a new window will be opened. If you use the name of an existing window, it will navigate to the given URL. Window features allow you to specify the height, width, menu bar, tool bar, status bar, and so forth.
<script language = javascript>
function openwindow(){
    write("This is a new window");
  return false;

function openwindow2(){
<input type=button value="Click me to open a new window" onclick="openwindow()">
<input type=button value="Click me to goto Yahoo" onclick="openwindow2()">
William Wen
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date