Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Dec 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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>

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,614
    Thanks
    80
    Thanked 4,635 Times in 4,597 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •