need help in coding

chander

Registered Member
Joined
Jul 6, 2011
Messages
99
Reaction score
5
i am looking for some java script code, what i am looking to di is, when someone exit my websites a popup window appears and after hitting the ok button one another url should open...how could i do that i have tried with the following code..

Code:
<html>
<head>
<script type="text/JavaScript">
function ExitPage()
{
alert ('Thank you for visiting our site.');
}

function load(url)
{
window.open(url,'_blank','scrollbar=yes') ;
}
</script>
</head>
<body onbeforeunload="ExitPage();">
</body>
</html>
 
Last edited:
Code:
<html>
<head>
<script type="text/JavaScript">
function ExitPage() { 
alert ('Thank you for visiting our site.');
window.open('http://www.google.com','_blank','scrollbar=yes');
}
</script>
</head>
<body onbeforeunload="ExitPage();">
</body>
</html>
 
this is working only with IE and when allow the pop up :(
 
Back
Top