Make an ad to be the latest element loaded on a page

Discussion in 'Programming' started by downloadvyp, Sep 12, 2011.

  1. #1
    Hello

    I want to make ads to load last.so,after all the website's page elements are loaded,what code do i need to make an ad load last ?

    thank you
     
    downloadvyp, Sep 12, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    You need to put the add loading code last in the execution order.
     
    Rukbat, Sep 12, 2011 IP
  3. nemanja.todic

    nemanja.todic Well-Known Member

    Messages:
    69
    Likes Received:
    4
    Best Answers:
    1
    Trophy Points:
    130
    #3
    I think that right solution for this issue is to use javascript.

    You should have empty div element with some ID:

    <div id="myImage"></div>
    Code (markup):

    Then, use JS like this:

    
    <script src="myscript.js" type="text/javascript"
    window.onload = function () {
        // load your image, place it into the myImage div.
    
    };
    </script>
    
    Code (markup):
     
    nemanja.todic, Sep 13, 2011 IP