You Are Now Leaving Site Script

thefallendevelopment

Regular Member
Joined
Aug 19, 2008
Messages
264
Reaction score
217
So i've been searching the web and cannot seem to find a script or anything that does this.

It's bascially like on mysp4ce when you click to goto another site off of mysp4ce it comes up with the "You are now leaving mysp4ce".

Is there a WP plugin for this or anything of the sort?

Thanks for any help!
 
This can be done with the javascript onunload event. Here is an example:

Code:
<html>
<head>
<meta content="text/html; charset=windows-1252" http-equiv=Content-Type>
<script type="text/javascript">

function checkLeave() {     
     alert("You Are Leaving ThisDomain.com");
}

</script>
</head>
<body onunload="checkLeave();">

<a href="http://www.google.com/">Leave</a>

</body>
</html>
 
Back
Top