Hi, I need my 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>
// Loads the video.
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 XSL value-of tag <xsl:value-of select="MediaUrlFolder"/>
.
Is there a solution for this? Hi can I add this kind of code in a safe way? Thanks!
=====================================
Now there is a weird problem (that was there before for sure, but I wasn't looking at the source code). The <script>
block isn't being rendered at all, nothing inside it, not even the <script></script>
tags. Do you know why this could be happening? Thanks.