I've been using mail.com email recently.
And everytime I close the tab, their annoying popup shows.
Does anyone know how to do this?
You can try it yourself.
http://mail.com
stmexitpop@mail.com stmexitpop
thats actually pretty simple
<script>
//specify page to pop-under
var popunder="http://www.thesiteyouwanttopopup.com"
//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=900,height=800,scrollbars=1,resizable=1,toolbar=0,location=0,menubar=0,status=0,directories=0,address=0,"
function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}
</script>
Have you tested it?
I tried in FF & IE8, doesn't seem to be working.
yes i'm running it on some of my sites right now and its working. but i think i have missed the last line of the code above. try this
<script>
//specify page to pop-under
var popunder="http://www.siteyouwanttopopup.com"
//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=900,height=800,scrollbars=1,resizable=1,toolbar=0,location=0,menubar=0,status=0,directories=0,address=0,"
function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}
</script>
<body onUnload="loadpopunder()">
Alright! It works!
Weird that noone else is interested in this.
Btw, you might want to change your popunder URL if it's your own site.
Yo shank 
Check this one out:
http://stmforum.com/forum/showthread...New-Tab-Window