title: AdMob webapp (javascript) - Refresh/ReNew ADS on click event
body: <p>Hy There</p>
  
  <p>I'v seen alot of admob topics on stackO, but unfortunutaly not for webapp usage.</p>
  
  <p>The one script that is presented on the web for using admob from a webpage is always:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
    var admob_vars = 
    {
        pubid: '[id]',
        bgcolor: '000000',
        text: 'ffffff',
        ama: false,
        test: false
     };
    &lt;/script&gt; 
    &lt;script type="text/javascript" src="http://mmv.admob.com/static/iphone/iadmob.js"&gt;&lt;/script&gt; 
  </code></pre>
  
  <p>Inside my webapp, i have a slideshow with arrows beneath. On click, you go to the next image, and i'm displaying admob ads at the top. Now the problem is, i think i'm always getting the same ad (green one). Is it possible to refresh the DIV that holds my admob script (from above)?</p>
  
  <p>I'm sure there's no need to paste my entire code here, onclick events,..etc. I just wanna know:</p>
  
  <p>a) Does adMob always give the same ad for a particular page? Or does it actually retrieve a diffrent kind of AD when they decide so?
  b) Can i affect the refresh of the script? I thought of deleting/inserting the script inside my dom w/jquery would be really stupid?</p>
  
  <p>EDIT:</p>
  
  <p>SO I HAVE ADDED an 
  
  <p>And then, on the prev(), next() event handlers i attached this: </p>
  
  <pre><code>var adFrame = document.getElementById("admob_ad");
  adFrame.src = adFrame.src;
  </code></pre>
  
  <p>Great, so now i'm refreshing my ads. probably?</p>
  
  <p>a) not always an AD is showing (i think admob does not always send you an ad)
  b) when an AD is shown, clicking on next() is slower than usual (probably because of the ad fetching) 
  c) have someone tested this ad refreshing for admob webintegration and can someone confirm the ads are counted on their account?</p>
  
  <p>thx</p>