Bonjour,
dans une JSP, j'ai une fonction javascript très simple qui comporte une boucle qui semble poser probleme.
En mettant cette boucle en commentaires, les autres fonctions peuvent être appelées normalement. Sinon, sans commentaires, l'appel à chacune des autres fonctions ne renvoie simplement rien.
voici donc le code :
Syntaxiquement, en quoi ce for pourrait-il poser problème?
Code : Sélectionner tout - Visualiser dans une fenêtre à part 
 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16function affiche(obj){ parent.bottomleft.document.close(); parent.bottomleft.document.open(); if(variables[obj]['declaration'].length > 1){ parent.bottomleft.document.write("<B><U>" + "D&eacute;finitions" + "</U></B>" + "<BR/>"); parent.bottomleft.document.write("<TABLE>"); for(i=0; variables[obj]['declaration'].length > i; i++){ parent.bottomleft.document.write("<TR>" + variables[obj]['declaration'][i] + "</TR>"); } parent.bottomleft.document.write("</TABLE>"); } }
note : for(i=0; 5 > i; i++) a exactement le même effet.
		
		
        



   


  Répondre avec citation

 
 
 
 

				
Partager