How to Create a Pop Up Window

A pop up window is a very effective method to help in the marketing of your web site because it grabs the visitor’s attention.
Unfortunately the pop up window has been abused online with “in-your-face” advertising. They have become so pervasive that pop up blockers were created. Now almost everyone employs some type of pop up blocker and most browsers now have pop up blockers built into them.

How can you avoid pop up blockers?

My suggestion is to use the pop up window when the visitor triggers it such as clicking on a link. Pop ups or pop unders that automatically occur when the visitor views a web page are annoying and will leave a bad impression. Your visitor may not want to return.

Pop Up Uses

  • link to an external web page that pops up so the visitor won’t leave your web site.
  • provide information quickly, such as surveys, subscription forms or polls.
  • get help (with a form)

How to create a javascript pop up window

Place this snippet of code in the body of your html code.

<a href="pop.html" onclick="'pop.html','popup','height=250,width=350,scrollbars=no');return(false);"> Link </a>

Explanation of the code

pop.html – name of the document you want to be loaded into the pop up window
popup – name of the window if we need to use it for other things later.
height & width – height and width of the pop-up window that can be adjusted.
scrollbars – specifies if you want to have a scrollbar in the window or not, values can be yes and no


If you use the pop up window to link to an external page make sure you it’s wide enough for
visitor to view the whole page otherwise they will have to scroll horizontally. Vertical scrolling is fine
because visitors do this anyway whenever they visit web sites.


Javascript Pop Up Window

Pop up window maker


  1. Hi, thet’s good! It’s NICE SITE !!! 123 !

  2. Hello, I found this article while searching for help with JavaScript. I have recently changed browsers from Chrome to Microsoft IE 6. After the change I seem to have a issue with loading JavaScript. Every time I browse page that requires Javascript, the page freezes and I get a “runtime error javascript.JSException: Unknown name”. I can’t seem to find out how to fix it. Any help is very appreciated! Thanks

  3. I really like the fresh perpective you did on the issue. Really was not expecting that when I started off studying. Your concepts were easy to understand that I wondered why I never looked at it before. Glad to know that there’s an individual out there that definitely understands what he’s discussing. Great job!

  4. Searching I noticed your site book-marked as: How to Create a Pop Up Window.
    Now i’m assuming you bookmarked it yourself and wanted to ask if social book-marking gets you a bunch of traffic? I’ve been thinking of doing
    some book-marking for a few of my websites but wasn’t certain if it would produce any positive results. Thank you so much.

Speak Your Mind