You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ron Chan <rc...@i-tao.com> on 2000/04/24 10:45:39 UTC
jscript problem
Has anyone had this problem...
I can get javascript into my pages by doing this
<SCRIPT LANGUAGE="JavaScript" SRC="editor.js">
<xsl:text> </xsl:text></SCRIPT>
but I would like to include some dynamic content in my javascipt
for example ....
<SCRIPT LANGUAGE="JavaScript"><xsl:comment>
function load(form)
{
<xsl:for-each select="products/product">
doAddProduct(form,
"<xsl:value-of select="@id"/>",
"<xsl:value-of select="name"/>",
"<xsl:value-of select="price"/>",
"<xsl:value-of select="description"/>");
</xsl:for-each>
}
// </xsl:comment>
</SCRIPT>
the output pages of cocoon renders everything into one line, which is fine for HTML but seems to make the javascript incomprehensible by the browsers
can anyone help?
Ron