vinodh_v_p
06-12-2008, 01:33 PM
Hi,
I am having an xsl file in which I am trying to pass a value from an xsl variable to an HTML td named "descID" using javascript.
The following is the code fragment for this.
<xsl:if test="not($descriptionVal='null')">
<script>
document.getElementById("descID").innerHTML='<xsl:value-of select="normalize-space($descriptionVal)" disable-output-escaping="yes"/>';
</script>
</xsl:if>
The problem is that when descriptionVal contains single quotes , I am getting a javascript error.I tried to convert single quotes to ' .But no use.
Can anybody give me some idea ,how to handle this situation?
Please help..
Thanks
I am having an xsl file in which I am trying to pass a value from an xsl variable to an HTML td named "descID" using javascript.
The following is the code fragment for this.
<xsl:if test="not($descriptionVal='null')">
<script>
document.getElementById("descID").innerHTML='<xsl:value-of select="normalize-space($descriptionVal)" disable-output-escaping="yes"/>';
</script>
</xsl:if>
The problem is that when descriptionVal contains single quotes , I am getting a javascript error.I tried to convert single quotes to ' .But no use.
Can anybody give me some idea ,how to handle this situation?
Please help..
Thanks