?
Solved

IE8 Ad Loader

Posted on 2013-11-18
11
Medium Priority
?
376 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
11 Comments
 
LVL 7

Expert Comment

by:valmatic
ID: 39659552
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
ID: 39660344
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
ID: 39703545
Any ideas?
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 

Author Comment

by:webstuck5
ID: 39774387
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
 
LVL 53

Expert Comment

by:Scott Fell, EE MVE
ID: 39813495
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 43

Expert Comment

by:Rob
ID: 39813526
I'll have a look and do some testing and see what I can find...
0
 
LVL 43

Expert Comment

by:Rob
ID: 39814093
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
ID: 39817109
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
ID: 39843933
Apparently, my code was right but the page wasn't updating.
0

Featured Post

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…
Suggested Courses

764 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