CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   JavaScript programming (http://www.codingforums.com/forumdisplay.php?f=2)
-   -   Convert a script in popup popunder (http://www.codingforums.com/showthread.php?t=284993)

coquinenet 12-29-2012 11:49 AM

Convert a script in popup popunder
 
Hi

I have a script for popup but i want convert this script popunder
Is that possible ? thx for your help

Code:

<script type="text/javascript">// <![CDATA[
var cookieinfo;
function CookieExist(CookieName) { cookieinfo = document.cookie; if (cookieinfo.indexOf(CookieName) == -1) { return false; } else { return true; } }
function SetCookie(CookieName,CookieArgs,CookieExpire) { document.cookie = CookieName + "=" + CookieArgs + ";" + "expires=" + CookieExpire; }
function GetCookie(CookieName) { if ( CookieExist(CookieName) ){ d = cookieinfo.indexOf(CookieName) + CookieName.length + 1; f = cookieinfo.indexOf(";",d); if ( f == -1) { f = cookieinfo.length; } return (cookieinfo.substring(d,f)); } else { return ("0"); } }
// ]]></script>
<script type="text/javascript">// <![CDATA[
var pup=0;
function popup ()
{
if(pup===0)
{
pup=1;
if(GetCookie("deja_clique")==1)
{
return;
}
else
{
SetCookie("deja_clique",1,"");

var popun=String
     
popun[0]="http://www.yahoo.com";
popun[1]="http://www.facebook.com";
popun[2]="http://www.google.com";


resultat = Math.floor(Math.random() * 3);

window.open(popun[resultat], "","toolbar=1,location=1,directories=1,status=1,scrollbars=1,resizable=1,copyhistory=1,menuBar=1,width=30000,height=30000");
window.focus();
popup.blur();
}
}
}
document.onclick=popup;
// ]]></script>


Old Pedant 12-29-2012 10:32 PM

What is a popunder???

Do you mean a "pop over", actually? That is, you use a <div> on the same HTML page, put the content in that <div>, and then have the <div> appear over the top of the rest of the HTML???

That's not possible to do if you are trying to put the content from an entire URL into a <div> unless you put an <iframe> inside the <div>. Unfortunately, some sites--most notably Google--will *NOT* allow themselves to be placed inside an <iframe>.

So... Explain what you mean by "popunder" and explain what the purpose is.


All times are GMT +1. The time now is 03:34 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.