I need XSL to add dynamic content to a javascript block. I am wondering if this is possible. Here is an example of what I want to do. The following code does NOT work:
<script>
var s1 = new SWFObject("player-viral.swf","ply","670","350","9","#ffffff");
s1.addParam("allowfullscreen","true");
s1.addParam("allownetworking","all");
s1.addParam("allowscriptaccess","always");
s1.addParam("flashvars","file=/Portals/0/<xsl:value-of select="MediaUrlFolder"/><xsl:value-of select="ImageUrlFileName"/>&image=/Portals/0/<xsl:value-of select="ImageUrlFolder"/><xsl:value-of select="ImageUrlFileName"/>");
s1.write("container");
</script>
The parser breaks when I add the value of an XSL tag <xsl:value-of select="MediaUrlFolder"/>.
Is there a solution for this? Hi, can I add this code in a safe way? Thanks!
=======================================
Now there is a strange problem (it was before, but I did not look at the source code). A block is <script>not displayed at all, nothing inside it, even tags <script></script>. Do you know why this could happen? Thanks.
source
share