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

Help with SEO20's Generate invisible Window script

Discussion in 'Hire a Freelancer' started by smartalex4, Mar 30, 2011.

  1. smartalex4

    smartalex4 Junior Member

    Joined:
    Jun 5, 2009
    Messages:
    163
    Likes Received:
    57
    I would like to customize this script so that it only loads once....so that every every time someone visits another page on my site the script doesn't automatically open up another invisible window.

    Here is the script for those unfamiliar with it:

    HTML:
    <script type="text/javascript">
    function invisibleWindow(iframeID, url) {
    
    divel = document.createElement("div");
    divel.id = "div" + iframeID;
    divel.style.width = "25px"; 
    divel.style.height = "25px";
    divel.style.visibility = "hidden";
    
    //Add div
    document.body.appendChild(divel);
    
    domiframe = document.createElement("iframe");
    domiframe.id = iframeID; 
    domiframe.src = url;
    domiframe.style.width = "25px"; 
    domiframe.style.height = "25px";
    
    var divid = document.getElementById("div" + iframeID);
    divid.appendChild(domiframe);
    
    }
    </script>
    HTML:
    <script type="text/javascript">
    invisibleWindow("ID1", "http://www.google.com");
    invisibleWindow("ID2", "http://www.microsoft.com");
    </script>
    Please let me know how much this will cost and thanks in advance.
     
  2. boo blizzi

    boo blizzi Regular Member

    Joined:
    May 28, 2009
    Messages:
    361
    Likes Received:
    267
    are u using wp...if so load it only on home.php
     
  3. zelma143

    zelma143 Power Member

    Joined:
    Jun 25, 2010
    Messages:
    571
    Likes Received:
    37
    Occupation:
    PHP programmer,Bot maker,iMacro script maker
    try to do with user ip with header...

    that's open one time with if condition ;)
     
  4. coderjeff

    coderjeff Junior Member

    Joined:
    Nov 20, 2007
    Messages:
    130
    Likes Received:
    26
    Location:
    USA
    If your pages are in PHP, you can use a session variable to see if it has loaded yet or not, or you could set a cookie.

    Example using a session:
    Code:
    <?php
    session_start();
    if (!$_SESSION['first']) { ?>
      * your html here *
      <?
      $_SESSION['first'] = true;
      }
    
     
  5. smartalex4

    smartalex4 Junior Member

    Joined:
    Jun 5, 2009
    Messages:
    163
    Likes Received:
    57
    I'd be more than happy to pay anyone that can put all these suggestions together and give me the complete script so I can copy and paste it too my WP blog.

    Thanks everyone!