I want to open pop-up on exit (Not \"stay on page or leave\" box). I can\'t get this working. Where do I make mistake ?
function poponload() { testwindow = wind
Your code has a syntax error. You have an extraneous parenthesis after the onbeforeunload function assignment. Remove it and see if that fixes your issue.
window.onbeforeunload = function () { poponload(); };