[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

<div id=$xslvar and document.getElementById($xslvar)

Subject: <div id=$xslvar and document.getElementById($xslvar)
From: "meidan" <asafmei@xxxxxxxxxxxx>
Date: Sun, 26 Oct 2003 12:04:46 +0200
getelementbyid div
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.