views:

25

answers:

1

The code below is the ad that is being served. Since the ad is at the very top of the page, we want to make sure that it doesn't stop the site from loading if their server happens to go down. We are looking for either a javascript or C# ASP.NET solution. We have tried rewriting it to work on DOM Ready, but it does not seem to work that way.

<!--LEADERBOARD AD-->
    <center>
    <div>
    <script type='text/javascript'><!--        //<![CDATA[
        var m3_u = (location.protocol == 'https:' ? 'https://www.oncampusweb.com/delivery/ajs.php' : 'http://www.oncampusweb.com/delivery/ajs.php');
        var m3_r = Math.floor(Math.random() * 99999999999);
        if (!document.MAX_used) document.MAX_used = ',';
        document.write("<scr" + "ipt type='text/javascript' src='" + m3_u);
        document.write("?zoneid=341");
        document.write('&amp;cb=' + m3_r);
        if (document.MAX_used != ',') document.write("&amp;exclude=" + document.MAX_used);
        document.write(document.charset ? '&amp;charset=' + document.charset : (document.characterSet ? '&amp;charset=' + document.characterSet : ''));
        document.write("&amp;loc=" + escape(window.location));
        if (document.referrer) document.write("&amp;referer=" + escape(document.referrer));
        if (document.context) document.write("&context=" + escape(document.context));
        if (document.mmm_fo) document.write("&amp;mmm_fo=1");
        document.write("'><\/scr" + "ipt>");
    //]]>--></script><noscript><a href='http://www.oncampusweb.com/delivery/ck.php?n=ae7029e9&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.oncampusweb.com/delivery/avw.php?zoneid=341&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;amp;n=ae7029e9' border='0' alt='' /></a></noscript>
    </div>
    </center>
    <!--LEADERBOARD AD-->
A: 

I vaguely remember facing a similar problem I had a few years ago. What I had to do was load the ad in the footer. That way, your page will always load. Of course, the downside is that it won't display until the page is fully loaded.

Tyler