Solved

IE8 Ad Loader

Posted on 2013-11-18
11
369 Views
Last Modified: 2014-02-08
I load my AdSense ads at the top of my web page at http://www.RomanceStuck.com. I then use Javascript to move those ads to various areas on the web page. This seems to work for most browsers but I just realized it is not working in IE8. IE8 loads the ads at the top of the page but it never moves the ads. Can someone tell me what I am doing wrong?

Thanks!
0
Comment
Question by:webstuck5
11 Comments
 
LVL 7

Expert Comment

by:valmatic
Comment Utility
ie8 is not a supported browser for adsense effective 10-1-13 see below post.
https://support.google.com/adsense/answer/191268?hl=en
0
 

Author Comment

by:webstuck5
Comment Utility
It states that, "Note that this change will only affect your ability to access the AdSense interface. Please be assured that users using Internet Explorer 8 to view ads on your site will not be affected." The AdSense ads load on my page but my javascript isn't moving them to where I need them to go. Thanks!
0
 

Author Comment

by:webstuck5
Comment Utility
Any ideas?
0
 

Author Comment

by:webstuck5
Comment Utility
An example of the code that I use to move the ad is:

      <!-- POSITION AD - START -->
        <div id="ad_nav_1_position">
        </div>
        <script>
          if (document.getElementById('ad_nav_1') != null)
          {
            document.getElementById('ad_nav_1_position').appendChild(document.getElementById('ad_nav_1'));
          }
        </script>
      <!-- POSITION AD - END -->
0
Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

 
LVL 52

Expert Comment

by:Scott Fell, EE MVE
Comment Utility
Can you help paint a picture of what you mean by move the ad(s)?  Do you mean when the browser is resized?

Are you talking about
<script>
        document.write('<div id="' + ad1_position + '" style="' + ad1_div_style + ' width=' + ad1_width + 'px; height=' + ad1_height + 'px;">');
        document.write('<scr' + 'ipt async ' + 'src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">' + '</scr' + 'ipt>');
        document.write('<ins class="adsbygoogle" ');
        document.write('style="display:inline-block;width:' + ad1_width + 'px;height:' + ad1_height + 'px" ');
        document.write('data-ad-client="' + ad_client + '" ');
        document.write('data-ad-slot="' + ad1_slot + '">');
        document.write('</ins>');
        document.write('<scr' + 'ipt>' + '(adsbygoogle = window.adsbygoogle || []).push({});' + '</scr' + 'ipt>');
        document.write('</div>');
        document.write('<div id="' + ad2_position + '" style="' + ad2_div_style + ' width=' + ad2_width + 'px; height=' + ad2_height + 'px;">');
        document.write('<scr' + 'ipt async ' + 'src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">' + '</scr' + 'ipt>');
        document.write('<ins class="adsbygoogle" ');
        document.write('style="display:inline-block;width:' + ad2_width + 'px;height:' + ad2_height + 'px" ');
        document.write('data-ad-client="' + ad_client + '" ');
        document.write('data-ad-slot="' + ad2_slot + '">');
        document.write('</ins>');
        document.write('<scr' + 'ipt>' + '(adsbygoogle = window.adsbygoogle || []).push({});' + '</scr' + 'ipt>');
        document.write('</div>');
        document.write('<div id="' + ad3_position + '" style="' + ad3_div_style + ' width=' + ad3_width + 'px; height=' + ad3_height + 'px;">');
        document.write('<scr' + 'ipt async ' + 'src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js">' + '</scr' + 'ipt>');
        document.write('<ins class="adsbygoogle" ');
        document.write('style="display:inline-block;width:' + ad3_width + 'px;height:' + ad3_height + 'px" ');
        document.write('data-ad-client="' + ad_client + '" ');
        document.write('data-ad-slot="' + ad3_slot + '">');
        document.write('</ins>');
        document.write('<scr' + 'ipt>' + '(adsbygoogle = window.adsbygoogle || []).push({});' + '</scr' + 'ipt>');
        document.write('</div>');
    </script>

Open in new window

0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
I'll have a look and do some testing and see what I can find...
0
 
LVL 42

Expert Comment

by:Rob Jurd, EE MVE
Comment Utility
The code isn't working because the adwords aren't being loaded into your <div id="ad_nav_1_position"> element

empty element
You could try targeting the iframe to move the ads but looks that the id of the iframe is variable.

I suspect it will be the order in which the javascript loads.  There is so much code on this page thought it's making it virtually impossible to know what's going on.
0
 

Accepted Solution

by:
webstuck5 earned 0 total points
Comment Utility
All of a sudden, it looks like the ads are displaying where I want them but I didn't change anything Maybe they had been cached or something. Thanks for all your help!
0
 

Author Closing Comment

by:webstuck5
Comment Utility
Apparently, my code was right but the page wasn't updating.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now