1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto Link Launcher

Discussion in 'Blogging' started by koded, Jun 29, 2009.

  1. koded

    koded Newbie

    Joined:
    May 18, 2009
    Messages:
    5
    Likes Received:
    0
    Is there a script that could launch pop up or pop under pages when a visitor enters a certain website. Or clicks on a link.
    I want to place my ad banner codes in it. So when a user clicks on a link, its like he's clicking on a couple of ads on my site and those pages pop up or under. and the same referrer info is passed to all of them...
     
  2. coolkid123

    coolkid123 Power Member

    Joined:
    May 21, 2009
    Messages:
    563
    Likes Received:
    672
    Occupation:
    Programming For Myself And Home Education (FUture
    Location:
    On A Chair In The United Kingdom
    Home Page:
    this is the script for that:
    Code:
    <HTML>
    <HEAD>
    <TITLE>Opening a Popup Window</TITLE>
    <SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
    <!-- Hide script from old browsers
    
    function popup(){
    
    popupwindow = window.open("somewhere.html","","toolbar=no,location=no,scrollbars=no,resizable=no,width=400,height=200,left=500,top=200") 
    
    }
    // End hiding script from old browsers -->
    </SCRIPT>
    </HEAD>
    <BODY onLoad="popup()" onunLoad="popup()">
    <a href="javascript[IMG]http://images.devshed.com/fds/smilies/tongue.gif[/IMG]opup()">Open window</a>
    <br>
    <a href="javascript[IMG]http://images.devshed.com/fds/smilies/tongue.gif[/IMG]opupwindow.close()">Close window</a>
    </BODY>
    </HTML>
     
    • Thanks Thanks x 1
  3. koded

    koded Newbie

    Joined:
    May 18, 2009
    Messages:
    5
    Likes Received:
    0
    this will only pop up a window. I want somethin that emulates a user click on a number of ads I can add.
     
  4. waylander

    waylander Registered Member

    Joined:
    Apr 4, 2009
    Messages:
    71
    Likes Received:
    21
    Location:
    Russia
    Home Page:
    click under:
    1. Get this code
    HTML:
    function PopShow3() {
    CookieTest=navigator.cookieEnabled;
    if(CookieTest)
    {
    ClickUndercookie = GetCookie('clickunder');
    if (ClickUndercookie == null)
    {
    var ExpDate = new Date ();
    ExpDate.setTime(ExpDate.getTime() + (24 * 60 * 60 * 1000));
    SetCookie('clickunder','1',ExpDate, "/");
    window.open("javascript:location.href='http://yourdomain.com';","PopWin3","width=800,height=600,resizable=1,toolbar=1,location=1,menubar=1,status=1,scrollbars=1'");
    window.focus();
    }
    }
    }
    function GetCookie (name) {
    var arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;
    while (i < clen) {
    var j = i + alen;
    if (document.cookie.substring(i, j) == arg)
    return getCookieVal (j);
    i = document.cookie.indexOf(" ", i) + 1;
    if (i == 0) break;
    }
    return null;
    }
    function SetCookie (name, value) {
    var argv = SetCookie.arguments;
    var argc = SetCookie.arguments.length;
    var expires = (argc > 2) ? argv[2] : null;
    var path = (argc > 3) ? argv[3] : null;
    var domain = (argc > 4) ? argv[4] : null;
    var secure = (argc > 5) ? argv[5] : false;
    document.cookie = name + "=" + escape (value) +
    ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
    ((path == null) ? "" : ("; path=" + path)) +
    ((domain == null) ? "" : ("; domain=" + domain)) +
    ((secure == true) ? "; secure" : "");
    }
    document.onmouseup=PopShow3;
    
    
    
    
    
    
    
    
    
    
    
    
    2. save file as "clickunder.js" and replace this script into ur site root folder
    3. insert this piece of code just before </body>
    HTML:
    <SCRIPT LANGUAGE="Javascript" SRC="http://yourdomain.com/clickunder.js"></SCRIPT> 
     
     
    • Thanks Thanks x 1
    Last edited: Jul 1, 2009
  5. koded

    koded Newbie

    Joined:
    May 18, 2009
    Messages:
    5
    Likes Received:
    0
    Thanks waylander, ill try it out soon. I am tryn to get my e-whore on..