HERE'S THE SCRIPT FOR A POPUNDER window for wordpress

9 replies
  • WEB DESIGN
  • |
I'm just looking for a way I can add a pop under window when someone visits my site.

Not an opt in popup or anything, just a popup which opens another site in a new window.

I looked around for plugins in the admin but couldn't find anything besides opt in small popups and such.

Any advice?

EDIT** Contacted a friend of mine...he sent me the following code. Works exactly as I wanted it to.

COPY AND PASTE THIS CODE EXACTLY AS HTML INTO YOUR WEBSITE. You can do this by adding a text widget box to the sidebar, and putting the script in there. Simple as that.

Here's the script. Change http://www.yahoo(dot)com to the domain you wish to redirect to.



<script>

//Pop-under window- By JavaScript Kit
//Credit notice must stay intact for use
//Visit JavaScript Kit- Your comprehensive JavaScript, DHTML, CSS, and Ajax stop for this script

//specify page to pop-under
var popunder="http://yahoo.com"

//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=1250,height=1250,scrollbars=1,r esizable=1,toolbar=1,location=1,menubar=1,status=1 ,directories=0"

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=0

///No editing beyond here required/////

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { // if cookie exists
offset += search.length
// set index of beginning of value
end = document.cookie.indexOf(";", offset);
// set index of end of cookie value
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(off set, end))
}
}
return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}

function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}

if (once_per_session==0)
loadpopunder()
else
loadornot()

</script>


This script works absolutely perfect for me. Read through the beginning of it as there are some variables you can change up as needed.
#popup #window #wordpress

Trending Topics