Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6540241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:57:15+00:00 2026-05-25T10:57:15+00:00

I created a mobile application using the jQuery Mobile Framework. All pages are loaded

  • 0

I created a mobile application using the jQuery Mobile Framework. All pages are loaded within index.php (using <div data-role="page" id="title">).

In the footer of each page, I added Admob code:

<div data-role="footer">
 <script type="text/javascript">
  var admob_vars = {
  pubid: 'XXXXXX', // publisher id
  bgcolor: 'FF9119', // background color (hex)
  text: 'FFFFFF', // font-color (hex)
  test: false // test mode, set to false to receive live ads
   };
 </script>
 <script type="text/javascript" src="http://mmv.admob.com/static/iphone/iadmob.js"></script>
</div>  

The result is that on all pages the same ad is shown, perhaps this is caused by the fact that all pages are loaded within index.php (so in index.php, about 10 ads are loaded at the same time).

Any idea how to fix this? How can I show different ads? Adrotation for each page request => what jQuery function is triggered?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:57:16+00:00Added an answer on May 25, 2026 at 10:57 am

    You should remove all the hard coded calls and do something like that:
    1. Bind a call to inject this code to ‘pagebeforeshow’ event – so each time before a new page is being shown to the user you will fetch a new ad and show it.
    2. How to fetch a new Ad:

    Another option (I took form Admob doc):
    You can programmatically display a new ad by putting an ad web page in an IFRAME:

       ...
       <iframe id="admob_ad" style="position: absolute; width: 320px; height: 48px; left: 0px; top: 0px;" noresize="noresize" frameborder="0" src="http://your_site.com/your_admob_web_page.html">
       </iframe>
       ...
       // refresh the IFRAME where you want to display a new ad
       var adIframeEl = document.getElementById("admob_ad");
    
       adIframeEl.src = adIframeEl.src;
       ...
    

    `

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Created a phonegap application using jQuery Mobile. Everything is working great for the most
I've created a Windows Mobile application that opens, edits and closes a data file
I'm in early (pre-coding) stages of developing a mobile web application using jQuery Mobile
I am creating rails mobile application using jQuery for mobile... and I am using
The setup of my Windows Mobile app is created using VS2008. It contains a
I have a Visual Studio 2008 Windows Mobile 6 C++ application that is using
I am trying to create a mobile version of a web application using VS2010
I am using Radio Layer Interface (RIL) Native APIs in Windows Mobile application .
I am currently building a game in phonegap using jQuery Mobile frame work. What
I created a sample hello world application using Flash Builder 4.5.1 (with the update

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.