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="window.open('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

Tip

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.

Resources

Javascript Pop Up Window
http://www.domedia.org/oveklykken/javascript-pop-up.php
http://www.javascript-coder.com/window-popup/javascript-popup-window.phtml
http://javascript.internet.com/navigation/centered-pop-up-window.html

Pop up window maker
http://javascript.internet.com/generators/popup-window.html
http://www.domedia.org/oveklykken/javascript-pop-up.php

One Response to “How to Create a Pop Up Window”

  1. Alex123 Says:

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

Leave a Reply