Script bannière rotative ne fonctionne pas ?

Résolu
ZADIG67 Messages postés 140 Date d'inscription   Statut Membre Dernière intervention   -  
ZADIG67 Messages postés 140 Date d'inscription   Statut Membre Dernière intervention   -
Bonjour,

<!--Ici nous allons mettre le Script d'une bannière rotative pour 6 bannières--><br_ />

<table align="center" border="0" width="100%">
<tbody>
<tr>
<td align="center" width="50%"> </td>
<td align="center" width="50%">
<script type="text/javascript">
//<![CDATA[
var number = 0; banner = new Image;
banner[number++] = "<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html target='_blank'><img src='http://ad.zanox.com/ppv/?23554168C1988278666' align='bottom' width='468' height='60' border='0' hspace='1' alt='www.tendea.fr'></a>"
<!-- FIN du code HTML zanox-affiliate -->
banner[number++] = "<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html" target='_blank'><img src="https://ad.zanox.com/ppv/images/error_empty.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="FR_02.01 Garde enfant 468x60 GIF 02"></a>"
<!-- FIN du code HTML zanox-affiliate -->
banner[number++] =
"<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html" target='_blank'><img src="https://ad.zanox.com/ppv/images/error_empty.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="FR_03.00 Seniors 468x60 GIF 02"></a>"
<!-- FIN du code HTML zanox-affiliate -->
banner[number++] = "<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html" target='_blank'><img src="https://ad.zanox.com/ppv/images/error_empty.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="www.tendea.fr"></a>"
<!-- FIN du code HTML zanox-affiliate -->
banner[number++] = "<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html" target='_blank'><img src="https://ad.zanox.com/ppv/images/error_empty.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="www.tendea.fr"></a>"
<!-- FIN du code HTML zanox-affiliate -->
banner[number++] = "<a href="https://ad.zanox.com/ppc/html/ppc_error_1.html" target='_blank'><img src="https://ad.zanox.com/ppv/images/error_empty.gif" align="bottom" width="468" height="60" border="0" hspace="1" alt="www.tendea.fr"></a>"
<!-- FIN du code HTML zanox-affiliate -->
increment = Math.floor(Math.random() * number);
document.write(banner[increment]); //]]>
</script></td>
</tr>
</tbody>
</table>
<br />
Comme vous pouvez le voir, ce code est fait pour travailler avec la plateforme Zanox.
Ce serai sympa de trouver l'érreur, car moi je n'y arrive pas

Merci



A voir également:

4 réponses

tryan44 Messages postés 1288 Date d'inscription   Statut Membre Dernière intervention   220
 
Salut,

Changer de script car la c'est très brouillon.
0
Stanislas Poisson Messages postés 424 Date d'inscription   Statut Membre Dernière intervention   66
 
deja utiliser des doubles quotes sans les antislashes dans un code javascript alors que c'est la valeur contenu entre doubles quotes.... C'est plutot tres amateur...

surtout quand on fais des bidouille style href="...'

le voila corriger déjà des quelles erreurs. Et comme le dis tryan44, changer complètement de code, celui si fait beaucoup trop brouillons.

<!--Ici nous allons mettre le Script d'une bannière rotative pour 6 bannières-->
<br_ />
<table align="center" border="0" width="100%">
	<tbody>
		<tr>
			<td align="center" width="50%"> </td>
			<td align="center" width="50%"> 
				<script type="text/javascript"> 
//<![CDATA[ 
var number = 0; banner = new Image; 
banner[number++] = "<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"www.tendea.fr\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
banner[number++] = "<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"FR_02.01 Garde enfant 468x60 GIF 02\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
banner[number++] =
"<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"FR_03.00 Seniors 468x60 GIF 02\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
banner[number++] = "<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"www.tendea.fr\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
banner[number++] = "<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"www.tendea.fr\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
banner[number++] = "<a href=\"https://ad.zanox.com/ppc/html/ppc_error_1.html\" target=\"_blank\"><img src=\"https://ad.zanox.com/ppv/images/error_empty.gif\" align=\"bottom\" width=\"468\" height=\"60\" border=\"0\" hspace=\"1\" alt=\"www.tendea.fr\"></a>" 
<!-- FIN du code HTML zanox-affiliate --> 
increment = Math.floor(Math.random() * number); 
document.write(banner[increment]); //]]> 
</script></td>
		</tr>
	</tbody>
</table>
<br />
0
ZADIG67 Messages postés 140 Date d'inscription   Statut Membre Dernière intervention  
 
Bonjour,

Voilà, je vous l'ai éclairci, j'espère que vous y voyez plus clair

<br_ />
<table align="center" border="0" width="100%">
<tbody>
<tr>
<td align="center" width="50%"> </td>
<td align="center" width="50%">
<script type="text/javascript">
//<![CDATA[
var number = 0; banner = new Image;


banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

banner[number++] = "<a href=\"http://nom_publicitaire/ppc/?23554174C751613786T\" target=\"_blank\"><img src= "adresse de l'image "></a>

increment = Math.floor(Math.random() * number);
document.write(banner[increment]); //]]>
</script></td>
</tr>
</tbody>
</table>
<br />
0
ZADIG67 Messages postés 140 Date d'inscription   Statut Membre Dernière intervention  
 
Merci, cela m'apprend à corriger mes erreurs d'amateur.
0