Home
Tutorials
Web Art
Links
HTML Art

HOW TO MAKE A POP UP WINDOW

© Gillian Buchanan May 2002

The simplest way is as follows:-

<a href="mypage.html" target=_blank>My Pop Up Window</a>

Click Here to see it in action!

If the page you are opening is on your site you should provide a way for visitors to close the window without having to click on the little X in the top right hand corner. You can do this with a very simple piece of Javascript. Copy the sample below exactly as shown - Javascript is NOT forgiving with errors in syntax or spelling:-

<a href="Javascript:self.close();">Click Here to Close Me!</a>

Change the text "Click Here to Close" to whatever you want, or insert an image instead; place this text in the page for the pop up window where you want the Close Window button or text to appear.

This opens up a pop up window complete with toolbars but there is no way of controlling its appearance. You will need to learn to use Javascript to make more controlled versions. Future tutorials will cover this technique.

Back to TOP