2 pièce(s) jointe(s)
Affichage différent suivant display sur DIV
Bonjour,
j'ai un probleme d'affichage que je ne comprends pas.
ci dessous le code:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| for(int i=0;i<ArraySize(ListEA);i++)
{
text=text+"<tr><td><div id='EA"+i+"' style='display:inline;'>";
text=text+"<table align='center' width='100%' border='1'><tbody>";
text=text+"<tr><td colspan='4'><div style='width: 100%; height: 350px; margin: 0 auto;' id='eq_div"+i+"'></div></td></tr>";
text=text+"<tr><td colspan='2'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repWL"+i+"'></div></td>";
text=text+"<td colspan='2'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repWLbyMagic"+i+"'></div></td></tr>";
text=text+"<tr><td width='25%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repNbTradeWL"+i+"'></div></td>";
text=text+"<td width='25%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repNbTradeBS"+i+"'></div></td>";
text=text+"<td width='25%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repNbTradeWLB"+i+"'></div></td>";
text=text+"<td width='25%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='repNbTradeWLS"+i+"'></div></td></tr>";
text=text+"<tr><td colspan='4'><div style='width: 100%; height: 350px; margin: 0 auto;' id='histo"+i+"'></div></td></tr>";
text=text+"<tr><td colspan='4' width='100%'>";
text=text+"<table align='center' width='100%' border='0'><tbody>";
text=text+"<tr><td width='30%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='byM"+i+"'></div></td>";
text=text+"<td width='30%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='byD"+i+"'></div></td>";
text=text+"<td width='30%'><div style='width: 100%; height: 300px; margin: 0 auto;' id='byH"+i+"'></div></td></tr>";
text=text+"</tbody></table>";
text=text+"</td></tr>";
text=text+"</tbody></table>";
text=text+"</div></td></tr>";
} |
Si je mets la propriété display de la balise DIV à inline tout se passe bien et j'obtiens le résultat de la 2eme image (c'est a dire le graph en grand), par contre si je la mets à none, après affichage par une fonction javascript j'obtiens le résultat de la 1ere image (le graphique est sur la gauche et plus petit).
Code:
1 2 3 4 5 6 7 8
| function show(x){
var i;
for(i=0;i<2;i++)
{
if(i==x)document.getElementById('EA'+i).style.display='block';
else document.getElementById('EA'+i).style.display='none';
}
} |
Si quelqu'un a une idée??
Merci d'avance
Pièce jointe 254489
Pièce jointe 254490