posted 19 years ago
hey all,
i work with an xml file and xsl file so i get html. i want to implement the <xsl:value-of select="@ANCHOR"/> in the javascriptfunction but he don't accept "<".
do i have to use a variable or so in javascript? how can i do this?
thanks a lot
tom
<script language="JavaScript" type="text/JavaScript">
<!--
function goToSection(sectionName)
{
location.hash = sectionName;
}
//-->
</script>
</head>
<xsl:for-each select="//TREE">
<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" bgcolor="#ffffff" onlload="goToHash('<xsl:value-of select="@ANCHOR"/>');">
</xsl:for-each>
--------------------------------------
or this: didn't work:
---------------------
<script language="javascript">
<![CDATA[
function goToHash() {
location.hash = ']]><xsl:for-each select="//TREE"><xsl:value-of select="@ANCHOR"/></xsl:for-each><![CDATA[';
}
]]>
</script>
</head>
<body leftmargin="0" topmargin="0" bottommargin="0" rightmargin="0" bgcolor="#ffffff" onlload="goToHash();">
[ April 01, 2004: Message edited by: Tom Brown ]