Home > General > Affiliate Marketing Forum

Popup on closing tab w/o prompt (6)


11-03-2011 12:03 PM #1 shanktank (Member)
Popup on closing tab w/o prompt

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

Code:
stmexitpop@mail.com
stmexitpop
After logging in, close the tab to see it in action.

I'm using FF btw.


11-03-2011 12:09 PM #2 nusolutionz (Veteran Member)

thats actually pretty simple

Code:
<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>
you can change the window size and width..its actually a popup although it's called popunder in the code. but it doesn't prevent the user from closing you page it only pops up a new window after the other one is closed


11-04-2011 07:08 AM #3 shanktank (Member)

Have you tested it?

I tried in FF & IE8, doesn't seem to be working.


11-04-2011 08:01 AM #4 nusolutionz (Veteran Member)

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

Code:
<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()">


11-04-2011 12:45 PM #5 shanktank (Member)

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.


11-09-2011 11:37 PM #6 tijn (Moderator)

Yo shank

Check this one out:
http://stmforum.com/forum/showthread...New-Tab-Window


Home > General > Affiliate Marketing Forum