Hello all,
I have XSL Stylesheet with function in JavaScript. I don't get any error but the function doesn't return anything.
please help.
dk
I have XSL Stylesheet with function in JavaScript. I don't get any error but the function doesn't return anything.
Code:
<SCRIPT>
<![CDATA[
<!--
function Right(str, n)
{
if (n <= 0)
return "";
else if (n > String(str).length)
return str;
else {
var iLen = String(str).length;
return String(str).substring(iLen, iLen - n);
}
}
// -->
]]>
</SCRIPT>
.
.
.
<xsl:template match="File">
<xsl:element name="A">
<xsl:attribute name="CLASS">normalTextNoUnderLine</xsl:attribute>
<xsl:attribute name="HREF">javascript: popAdobe(<xsl:value-of select="$SiteID" />, '<xsl:value-of select="Path" /><xsl:value-of select="Name" />')</xsl:attribute>
<script>Right('<xsl:value-of select="Name"/>',8)</script> <!-- somehow i can't get this to work -->
<xsl:text>     </xsl:text> Date:
<xsl:value-of select="DateLastModified" />
</xsl:element><BR/>
</xsl:template>
please help.
dk