Hi,
If this is not the correct forum, please advise.
I’m working on a sharepoint dataview that uses xslt, where I’m including javascript. I need to store a value of an xslt variable into a javascript variable.
Below is the code that I have:
<xsl:template name="dvt_1.rowview">
<script type="text/javascript">
<![CDATA[
var myData = ']]><xsl:value-of select="@requestDetailsFull" disable-output-escaping="yes"/><![CDATA[' ;
alert(myData) ;
The above works out fine. I have the “myData” containing value of the xslt variable “requestDetailsFull”. However, it seems to be encoding special characters. So, if I have “<” in the content, I get an alert that has “<”.
Would you be able to help with this? Do I have the javascript and xslt syntax in incorrect order?