Microsoft Corporation
Updated June 10, 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.
return false
prevents the hashmark from appearing in the location field of the main window, which would interfere with the functionality of the Back and Forward buttons.<IMG>
tags, it will miss any graphics files that are included in this script. If you use this script in a compiled help file, make it point to an HTML file rather than a graphics file.