I have some simple javascript that I want to run on a contact page it should display a pop-up when the page loads, and a different pop-up when the user navigates away.
The code I have below works fine on IE but on chrome the onunload
part doesn't work at all.
Is there any work-around for this?
<script>
window.onload = function(){
alert('Even if you aren\'t interested, please give our design some feedback as we would like to stay current.');
return;
}
window.onunload = function(){
alert('Thank you for your time and consideration');
return;
}
</script>