MasterDiz.com The WebMasters Portal Free Webmasters Resources
Home
A Tutorial on
 

A window that pops Up when the you leave the page

 

Sample HTML Document This is the SCRIPT Copy and paste Instructions
<html>
<head>
<title>
</title>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function justpop() {

var popunder= "
http://www.masterdiz.com/";
var width =
788;
var height =
480;
var left = screen.width - width +
60;
var p = 'scrollbars=
yes, resizable=yes,toolbar=yes,' + 'menubar=no,status=no,location=no, left=' + left + ',top=0,height=' + height + ',width=' + width;
win2=window.open(popunder,"",p);
win2.blur();
win2.width =
788 ;
win2.height =
480 ;
win2.left = left ;
}

// -->
</script>

</head>
<body leftmargin='0' topmargin='0' onUnload="justpop()">

</body>
</html>

First Part

This goes between <head>and</head>
Put the mouse cursor in the box, right mouse button click, sellect all, copy and past it in you html document.

 

Second Part

This goes in the <body here> Tag
Put the mouse cursor in the box, right mouse button click, sellect all, copy and past it in you html document.

 
This Script has 2 parts;
The first part goes between
<head>
and </head> Tags.

Put the URL of the web page or web site that you want to Pop uP where it says THE URL GOES HERE; in the Sample HTML Document, the URL is: http://www.masterdiz.com With Blue letters (see sample html document)
You can change the variables in the script; showing in
green in the sample html document

The second part goes inside the
<body
here>
 
It is very easy to make a mistake in the second part;

The wrong way is:

<body body leftmargin='0' topmargin='0' onUnload="justpop()">
The Right way to do it is:
<body leftmargin='0' topmargin='0' onUnload="justpop()">
See the Sample HTML document.

If you already have something else in your body tag like bgcolor="#??????" text="#??????", Just add the rest like this:

<body bgcolor="#620000" text="#FF8000" topmargin="0"
leftmargin="0" onunload="justpop()"
>

Disclaimer