Forum Moderators: open

Message Too Old, No Replies

Popunder becomes a popup

Code that is making a popunder window to popup

         

rickson7

7:48 pm on Jan 16, 2005 (gmt 0)

10+ Year Member



Hi guys,
Need some help from you...
There is a webpage (of another website) "page A" (an email registration form) that I have to use as a popunder on my website's index page -"Page B".

However, I think, due to the code for the form validation (email & other entries) on Page A, the page does NOT remain as a popunder, but POPS UP above my actual website's main page....

Is it because of this attribute in the body tag?
<body OnLoad="document.form1.email.focus();">

or it maybe because of this code they use:

<script>
<!--
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers¦¦document.getElementById) {
if (top.window.outerHeight<screen.availHeight¦¦top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}
//-->
</script>

If so, what counter can I use to beat it poping up above the main index page?

PS: Cannot make changes to PAGE A, just my own Index page "B" , or a NEW page "C" that we can call this registration page into .... which will then be the actual popunder page..

Please help.
Thank you!

rickson7

11:51 am on Jan 17, 2005 (gmt 0)

10+ Year Member



Anybody, has any clues to this?
Would appreciate your help.
Thanks!

adni18

3:47 pm on Jan 17, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Paste your popUnder script, so we can see what we need to do with it.

rickson7

8:18 pm on Jan 17, 2005 (gmt 0)

10+ Year Member



Here's the popunder code:

<script>
var popunder="http://www.yahoo.com"
//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(offset, end))
}
}
return returnvalue;
}

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

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

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

</script>