I have a peculiar requirement where i need to open a jquery dialogue box as soon as the Visitor clicks on cancelling the browser tab.Actually this dialogue box would contain Some survey question. If Visitor Wish to take part in survey its OK else once he clicks on Dialogue Box close button Browser tab of website should Close automatically.
I am very new in jquery and i tried to get some help from Web but no luck..
I will be saved if i get the suggestion here. Thanks in advance..
This is the code that i am trying after the answer but not getting any alert Box..
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="js/jquery-1.7.1.js" type="text/javascript"></script>
<script type="text/javascript">
$( window ).unload(function() {
alert( "Bye now!" );
});
</script>
</head>
<body>
</body>