Buying Help with a Java Script

Discussion in 'Programming' started by smartalex4, Apr 8, 2011.

  1. #1
    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 DOES NOT automatically open up another invisible window.

    Please PM your quotes....thanks in advance

    <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>
    HTML:
     
    smartalex4, Apr 8, 2011 IP
  2. smartalex4

    smartalex4 Active Member

    Messages:
    264
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    As Seller:
    100% - 0
    As Buyer:
    100% - 0
    #2
    Cash Nebula was gracious enough to assist me with this....so I think I am good now!
     
    smartalex4, Apr 8, 2011 IP