Forum Moderators: open
Just to play around I also hardcoded the path in the Js file but the only way I could access the image was by something like this ../image and not with an absolute path like c:/output/image or c:\output\image
In your XSL, you can create a <script> element and define a global variable in it.
[the following goes in your XSL, preferably inside the <head> or early in the <body>]
<script>
<xsl:text>window.myvariable = '</xsl:text>
<xsl:value-of select="xpath-to-your-image-name" />
<xsl:text>';</xsl:text>
</script>
Another way would be to hide the image name in the DOM, and use JavaScript to retrieve it
Another way would be to create an XML "Island" in the DOM, and parse data out of that
I'd go for the first method; it's easiest.
Good luck cjcj1!