Hi,
I am trying to make id=$var and later on get that id with CDATA -
document.getElementById($var) so I can alter the position top left etc.
but I have a definition problem.
The relevant code:
<msxsl:script implements-prefix="ext" language="javascript">
<![CDATA[
function xsltoscript(xsltname){
return xsltname;
}
]]>
</msxsl:script>
<xsl:variable name="xslvar" select="//xmlelem"/>
<div Id="$xslvar"
style="position:absolute; top:{$yposition - 20}; left:{$xposition}">
<script language="JavaScript" >
<![CDATA[
document.getElementById(]]><xsl:value-of
select="ext:xsltoscript(string($xslvar))"/><![CDATA[).style.left=800;
]]>
</script>
The xml file:
<xmlelem>sometext</xmlelem>
While processing that I get :'sometext' is not defined
While giving a variable that is not connected with an xml file
like:<xsl:variable="xslvar" select=" 'anything ' "/> it goes
with no problem.
Do you have any idea whats wrong here?
Udi
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list