AUTO POPUPS ON ENTRY 

 

High Traffic AD spot for rent

Free Ad Quote

Live Help

1 204 344 5070



Last issue we told you how you could launch a sound file on entry to your pages. How would
you like to launch popup windows on entry? This can be done easily with Javascript. Here is a
code example:

<script language="Javascript">
pop1=window.open("http://
yoursite.com","pop1",
"toolbar=yes,location=yes,directories=yes,status=yes,
menubar=no,scrollbars=yes,resizable=yes,width=800,height=600");
window.focus()
pop2=window.open("http:/
/url of pop up box","pop2",
"toolbar=0,location=0,status=1,menubar=0, scrollbars=1,resizable=1,width=800,height=600");
window.focus()
</script>

How does this all work? The script tag is telling the browser that a script is about to be
declared or executed, and window.open is the Javascript function to open a new window. The
URL is just the URL in which you want the window to display. The next part you need to be
careful with. If you do not name the next part the same as the "pop1=window.open" it will not
function correctly. You can replace "pop1" with anything you like.

The next set of code is simply giving you options to play with the browser popup settings. Feel
free to set any of these to "yes" or "no".

The "pop1" and "pop2" text are called "variables". The pop2 variable is telling the browser to
open a new window again. The following text is the same as the first. The only difference is
the way the last string of code is displayed. We are now showing you a different way to code
browser display settings. "0" is NO, or FALSE. "1" is yes, or TRUE.