Background

newzynet -  
 newzynet -
Bonjour a tous,

je dois rajouter un background clickable a mon site. Le background provient d'un script OpenX pour tracker les impressions et clicks.

Autant afficher une image dans un DIV, pas de soucis mais comment mixer le background d'un div avec un script.

Le script a inclure dans le div est :

<script type='text/javascript'><!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://www.test.net/advertising/www/delivery/ajs.php':'http://www.test.net/advertising/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=8");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>--></script>


Merci de votre aide,

<config
>Windows XP / Firefox 3.6.20</config>
A voir également:

1 réponse

newzynet
 
Je fais un petit up.

L'example est visible sur http://arabic.newzy.net

Ce que j'ai fais pour l'instant c'est de creer un nouveau style:

#background_ad {
clear:both;
height:100%;
margin:0 auto;
padding:20px 0;
text-align:center;
width:100%;
z-index:0;
}


et j'ai rajoute dans ma le code suivant:

<div id="testing">
<!--/* OpenX Javascript Tag v2.8.7 */-->

<!--/*
  * The backup image section of this tag has been generated for use on a
  * non-SSL page. If this tag is to be placed on an SSL page, change the
  *   'http://www.newzy.net/advertising/www/delivery/...'
  * to
  *   'https://www.newzy.net/advertising/www/delivery/...'
  *
  * This noscript section of this tag only shows image banners. There
  * is no width or height in these banners, so if you want these tags to
  * allocate space for the ad before it shows, you will need to add this
  * information to the <img> tag.
  *
  * If you do not want to deal with the intricities of the noscript
  * section, delete the tag (from <noscript>... to </noscript>). On
  * average, the noscript tag is called from less than 1% of internet
  * users.
  */-->

<script type="text/javascript"><!--//<![CDATA[
   var m3_u = (location.protocol=='https:'?'https://www.newzy.net/advertising/www/delivery/ajs.php':'http://www.newzy.net/advertising/www/delivery/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=8");
   document.write ('&amp;amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;amp;charset='+document.charset : (document.characterSet ? '&amp;amp;charset='+document.characterSet : ''));
   document.write ("&amp;amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&amp;context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
//]]>--></script><script src="http://www.newzy.net/advertising/www/delivery/ajs.php?zoneid=8&amp;cb=76981603042&amp;charset=UTF-8&amp;loc=http%3A//arabic.newzy.net/" type="text/javascript"></script><a target="_blank" href="http://www.newzy.net/advertising/www/delivery/ck.php?oaparams=2__bannerid=52__zoneid=8__cb=40d539528f__oadest=http%3A%2F%2Fwww.gucciparfums.com%2Fen%2Fgucci-guilty-ph%2Finspiration.php"><img width="1252" height="1200" border="0" title="" alt="" src="http://www.newzy.net/advertising/www/delivery/ai.php?filename=gucci-bg_ok.jpg&amp;contenttype=jpeg"></a><div style="position: absolute; left: 0px; top: 0px; visibility: hidden;" id="beacon_40d539528f"><img width="0" height="0" style="width: 0px; height: 0px;" alt="" src="http://www.newzy.net/advertising/www/delivery/lg.php?bannerid=52&amp;campaignid=22&amp;zoneid=8&amp;OASCCAP=100&amp;loc=http%3A%2F%2Farabic.newzy.net%2F&amp;cb=40d539528f"></div>
<noscript><a href='http://www.newzy.net/advertising/www/delivery/ck.php?n=aba07b51&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE' target='_blank'><img src='http://www.newzy.net/advertising/www/delivery/avw.php?zoneid=8&amp;amp;cb=INSERT_RANDOM_NUMBER_HERE&amp;amp;n=aba07b51' border='0' alt='' /></a></noscript>
</div>


J'ai donc bien mon background clickabe mais elle n'a pas les proprietes d'une image background -
Est ce qu'il y a un autre moyen de le faire.

Merci.
0