Quackit Logo

Got a MySpace Page?

Get "www.yourname.com" for your MySpace page. Learn how >>.

HTML Popup Window Code

Print Version

You can use the following HTML code to create a popup window within your HTML document. Simply copy, paste, and change the values to suit.

Example HTML Popup Window Code:

<script>
// Popup window code
function newWindow(url) {
	popupWindow = window.open(
		url,
		'popUpWindow',
		'height=500,
		width=450,
		left=100,
		top=100,
		resizable=yes,
		scrollbars=yes,
		toolbar=yes,
		menubar=no,
		location=no,
		directories=no,
		status=yes')
}
</script>
<a href="JavaScript:newWindow('http://www.quackit.com/common/link_builder.cfm')">Open a popup window</a>

This results in:

Open a popup window

This example actually uses JavaScript code for the popup window. You can also open a new window using HTML code without JavaScript (although using the HTML method, you aren't able to specify how the window will look). To open a new window using HTML, see HTML Open New Window.

Enjoy this website?

  1. Link to this page (copy/paste into your own website or blog):
  2. Add this page to your favorite social bookmarks sites:
                     
  3. Add this page to your Favorites

Oh, and thank you for supporting Quackit!