Hello, I want to add a process that will trigger a show of advertisement or opening a new tab when the user close a the tab or browser.
$(window).bind("beforeunload", function(e) {
window.open(URL+'ads', '_blank');
return 'You are closing the browser';
});
The window.open and the return message is both not working. I tried also other possibilities but window.open is not working. Anyone knows about this?