JavaScript Popups

<head>
<script type="text/javascript">

function testPopup() {
window.open( "http://www.google.com/" )
}

</script>
</head>
<body>
<form>
<input type="button" onClick="testPopup()" value="Click">
</form>
</body>


OpenNewWindow =window.open('contact.html','help','toolbar=no,
location=0,directories=no,status=yes,menubar
=0,scrollbars=yes,resizable=yes,
width=300,height=350')





JavaScript Window.Open Arguments


When you open a window, you can set its URL, name, size, buttons, and other attributes, such as whether or not the window can be resized. The basic syntax of this method is


window.open(url, name, features, replace)


where

url is a URL that indicates the document to load into the window.

name is the name for the window (which is useful for referencing later on using the target attribute of HTML links).features is a comma-delimited string that lists the features of the window.

replace is an optional Boolean value (true or false) that indicates if the URL specified should replace the window’s contents or not. This would apply to a window that was already created.

An example of this method is

secondwindow = open("http://www.yahoo.com", "yahoo", "height=300,width=200,

 scrollbars=yes");



<a href="http://www.google.com" target="_blank">Go to Google</a>