Popup Window Generator

Create your popup window JavaScript with this generator.

The form below requires that you enter:

  1. the HTML for what you want to appear within the body of the popup window (if you don't know HTML then you can place paragraphs of text into the popup by placing <p> before the start of each paragraph and </p> after the end of each paragraph),
  2. the top, left position of where the window is to appear on the screen,
  3. the width and height that you want the popup window to have,
  4. the colour that you want to display behind your content,
  5. whether the window is to popup or popunder,
  6. whether to generate a close link in the window,
  7. and the text or HTML for the image that you want to use as the link for the popup window.

When you select the Create Popup button the necessary JavaScript for both the popup/under window and the link that will activate the window will then be created and displayed in the JavaScript Code and Popup Link text areas respectively.

Next you simply copy the JavaScript Code and paste it into a new file (you can call it whatever you want as long as it ends with .js eg. popup.js). You then attach this script into the head section of your page using the following code (substitute your filename for popup.js):

<script type="text/javascript" src="popup.js">

The next step is to copy the HTML for the link and paste it as code into the body section of your web page where you want it to appear.

Note that if you generate multiple popup windows using this generator then the JavaScript for each must be saved in a separate file and the links need to be placed on separate pages.

Enter the required information into this form to create your popup window.

HTML for Popup Content:
Top and Left:
Width and Height:
Window Colour:
Close: no
add link
Link Text:
JavaScript Code
Popup Link


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow