Click to return to the HTML Help home page    
Web Workshop  |  DHTML, HTML & CSS  |  HTML Help

Use JavaScript to launch a new browser window

Microsoft Corporation

Updated: April 6, 1999

You can use JavaScript to launch a new window (an instance of Internet Explorer). The code in this example can be used on both standard Web pages and within compiled help (.chm) files.

Create the link as follows:


<A HREF= "#" onClick="window.open('examples/sample.htm',

'Sample','toolbar=no,width=190,height=190,left=500,top=200,
status=no,scrollbars=no,resize=no');return false">
See the sample</A>.

where examples/sample.htm is the path to the file that will appear in the new window, Sample is the name argument for the new window, and the remaining values are the attributes for the pop-up window (width and height in pixels, toolbar, scroll bar, status bar, and resize). These attributes are separated by commas, and the entire line is enclosed in single quotes.

Notes



Back to topBack to top

Did you find this material useful? Gripes? Compliments? Suggestions for other articles? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.

 

link to overview topic Tips and Tricks