Probleme code html

alex2509 -  
bg62 Messages postés 23733 Date d'inscription   Statut Modérateur Dernière intervention   -
Bonjour, j'ai trouver un code sur internet me permettant de génére des belles feuilles de match pour mon site. Le probleme c'est quand je clique sur générer rien ne se passe... voici le code :
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 
<html> 
<head> 
  <style>div {white-space:nowrap;}</style> 
  <script> 
//Au cas où pas de JQuery 
function G(id) {return document.getElementById(id); } 
  
//Fonction qui génère la feuille de match 
function GenereFiche() 
{ 
G("txtFiche").value= 
"[table]" +  
"[row]" + 
"[head colspan=2]" + G("inJournee").value" + /head" +  
"/row" +  
"[row]" +  
"[col][size=17][align=center][color=red]" + G("inEquipe1").value + "/color/align/size/col" +  
"[col][align=center][size=17]" + G("inEquipe2").value + "/size/align/col" +  
"/row" +  
"[row]" +  
"[col][size=10][align=center][color=red]" + G("inScore1").value + "/color/align/size/col" +  
"[col][size=10][align=center]" + G("inScore2").value + "/align/size/col" +  
"/row" +  
"[row]" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t16.jpg/img/url/col" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t16.jpg/img/url/col" +  
"/row" +  
"[row]" +  
"[col][size=10][align=center]" + G("inBut1").value + "/align/size/col" +  
"[col][size=10][align=center]" + G("inBut2").value + "/align/size/col" +  
"/row" +  
"[row]" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t17.jpg/img/url/col" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t17.jpg/img/url/col" +  
"/row" +  
"[row]" +  
"[col][align=center][size=10]" + G("inJaune1").value + "/size/align/col" +  
"[col][size=10][align=center]" + G("inJaune2").value + "/align/size/col" +  
"/row" +  
"[row]" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t15.jpg/img/url/col" +  
"[col][img]http://i40.servimg.com/u/f40/15/20/31/62/sans_t15.jpg/img/url/col" +  
"/row" +  
"[row]" +  
"[col][align=center][size=10]" + G("inRouge1").value + "/size/align/col" +  
"[col][size=10][align=center]" + G("inRouge2").value + "/align/size/col" +  
"/row" +  
"/table" +  
"[b][u]Commentaire/u/b" : " + G("inComments").value; 
} 
  </script> 
  <title>autopostV2</title> 
</head> 
<body> 
<div style="text-align: center;"> 
<img style="width: 530px; height: 80px;" 
 alt="Formulaire feuille de match" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/entete10.png"><br> 
<img style="width: 130px; height: 130px;" alt="Logo" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/logo13.png"> 
<br> 
<img style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"><br> 
<img style="width: 50px; height: 50px;" alt="Etape 1" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/111.png"><br> 
<big style="color: rgb(255, 204, 102);"><span 
 style="font-weight: bold; font-style: italic;">Entrez Les 
Noms des Equipes<br> 
<br> 
</span></big> 
<img style="width: 200px; height: 60px;" alt="Equipe Locale" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/locaux10.png">   
            
  
<img style="width: 200px; height: 60px;" 
 alt="Equipe Visiteurs" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/visite10.png"><br> 
<input id="inEquipe1" style="width: 150px;" 
 maxlength="13" type="text"> 
           
        
<input id="inEquipe2" style="width: 150px;" 
 maxlength="13" type="text"><br> 
<div style="text-align: center;"> 
<br> 
<big style="color: rgb(255, 204, 102);"><span 
 style="font-weight: bold; font-style: italic;">Entrez Le 
Numero de la Journée<br> 
</span></big><input id="inJournee" 
 style="width: 20px;" maxlength="2" type="text"><br> 
<br> 
<img style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"><br> 
<big style="color: rgb(255, 204, 102);"><span 
 style="font-weight: bold; font-style: italic;"><img 
 style="width: 50px; height: 50px;" alt="etape 2" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/210.png"><br> 
Entrez vos 
resultats dans les cases ci-dessous</span><br 
 style="font-weight: bold; font-style: italic;"> 
</big> 
<br> 
<img style="width: 200px; height: 60px;" alt="Equipe Locale" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/locaux10.png"> 
<input id="inScore1" style="width: 20px;" maxlength="2" 
 type="text">  
            
     <input id="inScore2" 
 style="width: 20px;" maxlength="2" type="text"> 
<img style="width: 200px; height: 60px;" alt="Equipe Locale" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/visite10.png"></div> 
<br> 
<div style="text-align: center;"><img 
 style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"></div> 
<br> 
<div style="text-align: center;"><big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img 
 style="width: 50px; height: 50px;" alt="Etape 3" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/310.png"><br> 
Entrez 
les noms des buteurs et les minutes lors du but marqué</span><br 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"> 
<span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(Exemple 
: Messi (48eme), Xavi (65eme)<br> 
Si 
il n'y en pas, marqué : Aucun)</span></big><br> 
<br> 
<img style="width: 300px; height: 60px;" alt="Buteurs Locaux" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/but_lo10.png"><br> 
 <textarea id="inBut1" rows="1" cols="1"></textarea><br> 
<br> 
----------------------------------------------------------------------<br> 
<br> 
<img style="width: 300px; height: 60px;" 
 alt="Buteurs visteurs" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/but_vi10.png"><br> 
 <textarea id="inBut2" rows="1" cols="1"></textarea> 
<br> 
<br> 
<div style="text-align: center;"><img 
 style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"></div> 
<br> 
<big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img 
 style="width: 50px; height: 50px;" alt="Etape 4" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/411.png"><br> 
Entrez 
cartons Jaunes et Rouges</span><br 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"> 
<span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"></span></big><big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(Exemple 
: Messi (48eme), Xavi (65eme)<br> 
Si 
il n'y en pas, marqué : Aucun)</span></big><br> 
<br> 
<img style="width: 150px; height: 60px;" 
 alt="Carton jaune locaux" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/cjloc10.png"><br> 
<textarea id="inJaune1" rows="1" cols="1"></textarea><br> 
<br> 
<br> 
<img style="width: 150px; height: 60px;" 
 alt="Carton jaune visiteurs" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/cj_vis10.png"><br> 
<textarea id="inJaune2" rows="1" cols="1"></textarea><br> 
<br> 
<br> 
--------------------------------------------------------------------<br> 
<br> 
<img style="width: 150px; height: 60px;" 
 alt="Carton rouge locaux" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/crloc10.png"><br> 
<textarea id="inRouge1" rows="1" cols="1"></textarea><br> 
<br> 
 <br> 
<img style="width: 150px; height: 60px;" 
 alt="Carton rouge visiteurs" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/crvis10.png"><br> 
<textarea id="inRouge2" rows="1" cols="1"></textarea><br> 
<br> 
<br> 
<div style="text-align: center;"><img 
 style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"><br> 
</div> 
<br> 
<big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img 
 style="width: 50px; height: 50px;" alt="Etape 5" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/511.png"><br> 
Laissez 
un petit commentaire sur le match</span><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><br> 
<br> 
</span></big><img style="width: 300px; height: 60px;" 
 alt="Commentaires sur le match" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/commme10.png"><br> 
<textarea id="inComments" rows="3" cols="30"></textarea></div> 
<div style="text-align: center;"><br> 
<img style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"><br> 
<br> 
<big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><img 
 style="width: 50px; height: 50px;" alt="Etape 6" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/611.png"><br> 
Cliquez 
sur "Generer la fiche" ci-dessous</span></big><br> 
<br> 
<div style="text-align: center;"><input 
 onclick="GenereFiche()" value="Générer la fiche" 
 type="button"> 
</div> 
<hr style="margin-left: auto; margin-right: auto;"> 
<div style="text-align: center;"><textarea id="txtFiche" 
 rows="10" cols="50"></textarea></div> 
<br> 
<img style="width: 530px; height: 20px;" alt="separation" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/ligne12.png"><br> 
<span style="font-style: italic;"><span 
 style="font-weight: bold;"><br> 
<img style="width: 50px; height: 50px;" alt="Etape 7" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/711.png"><br> 
</span></span><big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">Copiez 
le code tel que vous le voyez dans la fenetre </span></big><big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(ctrl+c)<br> 
Puis collez ce code dans le post de votre match (ctrl+v)<br> 
</span></big><big><span 
 style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);"><br> 
</span></big><br> 
<img style="width: 530px; height: 80px;" alt="Pied de page" 
 src="http://i41.servimg.com/u/f41/11/21/80/33/pied10.png"></div> 
</div> 
</body> 
</html> 



A voir également:

3 réponses

tarek_dotzero Messages postés 817 Date d'inscription   Statut Membre Dernière intervention   122
 
Bonjour,

Trop long comme code.
Je suppose que le problème provient du JavaScript, alors je vous conseil de voir la console d'erreur JavaScript.
Vous aurez les Warning et les Erreurs fatales, et ça va vous permettre de localiser le problème.

Bon Courage.
0
freew Messages postés 172 Date d'inscription   Statut Membre Dernière intervention   4
 
voici le souci t'as copier le code avec un espace et t'as pas remarqué:
</span></big><big><span
style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">



je remonte et regarde si tu va copier le code sans espace là:

style="font-weight: bold; font-style: italic; color: rgb(255, 204, 102);">(ctrl+c)<br>
Puis collez ce code dans le post de votre match (ctrl+v)<br>


juste avant le "s"
0
bg62 Messages postés 23733 Date d'inscription   Statut Modérateur Dernière intervention   2 409
 
oui vraiment "un peu long" ....
mais :
 <style>div {white-space:nowrap;}</style> 

connais pas ça en 'html' ...
;)
0