|
i have one xml and xsl and i am using javascript in xsl to load xml values like
<script type="text/javascript">
chars="<xsl:value-of select="//system-params/login/forbiddenChars" disable-output-escaping="yes" />;
Length = <xsl:value-of select="//system-params/login/Digits" disable-output-escaping="yes"/>;
</script>
and now i do not want to write above javaScript code in XSL and only want to include javascript by creating seperate file for javascript.
provide answers with exapmle by defining three (3) seperate file. i am begineer in this language.
modified 17-Sep-12 3:10am.
|
|
|
|
|
May be it can help you
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="//system-params">
<html>
<head>
<script type="text/javascript" src="YourJSfile.js" />
</head>
</html>
</xsl:template>
|
|
|
|
|
Actually i want to do like this as you mention in your answer but i am loadind XML values in javascript and this script is in XSL.
If i write above code in javascript file then i can not load xml values because these values dynamically loaded at the time of HTML generation.
|
|
|
|