Javascript : Exit Pop-up

17 Mar

LINKING INSTRUCTIONS:
exit console must be the only console opening, it must open a full sized browser window that is scrollable and closeable. console must remain on top, and be the active window.

Setting up an exit console is a three step process;

Step 1.

Place the following within the <HEAD> and </HEAD> tags on your page;

<SCRIPT language=”Javascript”>
<!– BEGIN EXIT CODE
var console=true;
function exit()
{
if (console)
open(‘http://&#8217;);
}
// END EXIT CODE –>
</SCRIPT>

Step 2.
Place the following within your <BODY> tag

onunload=”exit()”

OR

onbeforeunload=”exit()”

For example;

<body bgcolor=”white” text=”black” link=”red” onunload=”exit()”>

OR

<body bgcolor=”white” text=”black” link=”red” onbeforeunload=”exit()”>

Step 3.
Place the following code within any <A HREF> tag that you *DON’T* want the console opening (eg. sponsor’s banners);

onclick=”console=false”

For example;

<a href=”http://www.yoursponsor.com/&#8221; onclick=”console=false”>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: