j'ai un petit probleme assez enerveant, j'ai une mise en forme de tableau et je voudrai pourvoir afficher et cacher via une fonction javascript.
voici le code:
Code : Tout sélectionner
<td colspan="4">
<a herf="#" onclick="display('code10');"><img src="image.jpg" />code :</a>
</td>
</tr>
<tr class="separator" id="code10">
<td colspan="4" class="code"><code><span style="color: #000000">
<span style="color: #0000BB"><?php </span><span style="color: #007700">function </span><span style="color: #0000BB">_getExtention</span><span style="color: #007700">( </span><span style="color: #0000BB">$filename </span><span style="color: #007700">){<br /> if(</span><span style="color: #0000BB">is_file</span><span style="color: #007700">(</span><span style="color: #0000BB">$filename</span><span style="color: #007700">)){<br /> </span><span style="color: #0000BB">$tableau </span><span style="color: #007700">= </span><span style="color: #0000BB">explode</span><span style="color: #007700">(</span><span style="color: #DD0000">'.'</span><span style="color: #007700">,</span><span style="color: #0000BB">$filename</span><span style="color: #007700">);<br /> return (string) </span><span style="color: #0000BB">array_pop</span><span style="color: #007700">(</span><span style="color: #0000BB">$tableau</span><span style="color: #007700">);<br /> }<br /> else {<br /> return (bool)</span><span style="color: #0000BB">true</span><span style="color: #007700">;<br /> }<br /> }<br /></span>
</span>
</code></td>le truc c'est de pouvoir cacher ou afficher la balise tr
le code javacsript fonctionne bien mais lors de l'affichage tous ce decale :?
merci
peut etre que ceci sera plus clair
<tr>
<td colspan="4">
<a herf="#">
<xsl:attribute name="onclick">
<xsl:text>display('code</xsl:text><xsl:value-of select="position()" /><xsl:text>');</xsl:text>
</xsl:attribute>
<img src='image.jpg'/>code :</a>
</td>
</tr>
<tr class='separator'>
<xsl:attribute name="id">
<xsl:value-of select="concat('code',position())"/>
</xsl:attribute>
<td colspan="4" class="code">
<xsl:value-of select='code' disable-output-escaping ="yes"/>
</td>
</tr>
j'utilise'none' pour cacher et pour afficher 'inline', la moitier des autre proprité pour les tableaux ne sont pas dispo