thomaska Posted December 3, 2015 Report Share Posted December 3, 2015 Hi, I am facing the following problem. I have fifteen (15) html files, one for each zone with the following code.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta content="text/html; charset=utf-8" http-equiv="Content-Type" /> <title>TravelScan.gr Adv</title> <style type="text/css"> html, body { margin: 0px; padding: 0px; } </style> <!-- OpenX Single Page Call Script--> <script type='text/javascript'> <!--// <![CDATA[ var OA_zones = { 'RightAd': 15 } // ]]> --> </script> <!-- Generated by Revive AdServer --> <script type='text/javascript' src='//ads.travelscan.gr/adserver/www/delivery/spcjs.php'></script> </head> <body> <script type='text/javascript'> <!--// <![CDATA[ OA_show('RightAd'); // ]]> --> </script> <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-58098404-1', 'auto'); ga('send', 'pageview'); </script> </body> </html>Each of this files are loaded from another page inside a parent container div with IFRAME as following<div id="ad15" style="width:300px; height:auto;"> <iframe id="RightAds15" onload="resizeIframe(this, 'ad15')" src="/Banners/RightAds15.html" width="300" height="250" frameborder="0" allowtransparency="true" scrolling="no"></iframe> </div>The problem that i am facing is that when the AdServer does not have banner to serve on a specific zone, the parent container div keeps the height and the page scrolls without any content. What i would like to do is to determine if the zone serves a banner and if not to hide the parent container div in order to minimize the height of the page to the real existing content. Is there any way to do that? And to answer your question why am i doing that with the iframe? Because the customer asked that for google analytics purposes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.