1

i have signed up at inmobi,have made a banner ad and tried my best to get it working to no avail,seems like the ad div appears,but not the ad itself here is my code.as yoU CAN see my property id provided by inmobi for ad has been entered.

<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <script src="components/loader.js"></script>
    <link rel="stylesheet" href="css/styles.css">
    <link rel="stylesheet" href="components/loader.css">
    <script src="js/cssua.min.js"></script>
    <script src="js/inmobi.js"></script>
    <script>
        var inmobi_conf = {
            siteid : "48a58302dd214f5ea5483a3f9d95a28e", // your Property ID
            slot: 15,
            test: true,
            manual: true,
            autoRefresh: 20,
            targetWindow : "_top", // default "_top"
            onError : function(code){
                if(code == "nfr"){
                    console.log("Error getting the ads!");
                }
                  if(code!=="nfr"){
                    console.log("getting the ads!");
                }
            }
        };

        document.addEventListener("deviceready", onDeviceReady, false);

        function onDeviceReady(){
            console.log('device is ready');
            showAds();
        }

        function showAds(){
            var adsElement = document.getElementById('ads');
            _inmobi.getNewAd(adsElement);
        }
    </script>
</head>

<body> 
    <div data-role="page">
        <header data-role="header" data-position="fixed" data-theme="c">
          <h1>Inmobi Client</h1>
        </header>
        <div data-role="content">
            <img src="images/logo.png" width="300px">
        </div>
        <div data-role="header" data-position="fixed"> 
            <div id="ads"></div>
        </div>
    </div>
</body>
</html>

0 Answers0