popup on browser close (not exit)

They have: 1 posts

Joined: Aug 2007

I have found a bunch of scripts to trigger a popup on exit, but I want one that onle triggers on the browser window closing.

Can anyone help?

Thanks

He has: 629 posts

Joined: May 2007

window.onunload = function() {// some code here; ...};

Perhaps?

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.