XSL transmettre une valeur a javascript
Bonjour,
J'essayes de passer le texte d'un élèment a un alert (javascript) j'ai le message d'erreur manque ":"
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head>
<script language="javascript">
function test(param)
{
alert(param)
}
</script>
</head>
<body>
<table>
<xsl:for-each select="navigation/test">
<xsl:if test="descriptionA">
<tr>
<td onclick="test({descriptionA})">
<xsl:value-of select="descriptionA"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body></html>
</xsl:template>
</xsl:stylesheet> |
Si je mets
Citation:
<td onclick="test('{descriptionA}')">
, l'alert me renovi évidement {descriptionA} mais pas son contenu réel.
Merci de votre aide