M
Matt
Is it possible to put XSL instructions inside JavaScript?
For example, pop up a message box with the xml value: alert(value in xml);
Approach #1:
<script type="text/javascript">
alert(<xsl:value-of select="@id"/>);
</script>
It will have javascript errors
Approach #2:
<xsl:text><script type="text/javascript"></xsl:text>
<xsl:text>alert(</xsl:text>
<xsl:value-of select="@id"/><xsl:text>)</xsl:text>
<xsl:text></script></xsl:text>
If I try the following, it will display the javascript as text,
not the javascript message box in browser.
any ideas?? thanks!!
For example, pop up a message box with the xml value: alert(value in xml);
Approach #1:
<script type="text/javascript">
alert(<xsl:value-of select="@id"/>);
</script>
It will have javascript errors
Approach #2:
<xsl:text><script type="text/javascript"></xsl:text>
<xsl:text>alert(</xsl:text>
<xsl:value-of select="@id"/><xsl:text>)</xsl:text>
<xsl:text></script></xsl:text>
If I try the following, it will display the javascript as text,
not the javascript message box in browser.
any ideas?? thanks!!