cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lincoln Mitchell" <linc...@interfaces-n-creatives.com>
Subject Using xsl variables in javascript
Date Wed, 13 Feb 2008 21:20:55 GMT
Hi all,

I am trying to use an xsl parameter in an external javascript file.

Do I have to use Control Flow / Flowscript to achieve this?

The docs say Control Flow is about ".the ability to describe the order of
Web pages." and in my case I don't need to do this.

I simple need to convert this inline javascript:

<script type="text/javascript">

  function myFunction(){

  <xsl:choose>

    <xsl:when test=" $myParam='x'">

      alert('x')

    </xsl:when>

  </xsl:choose>

  }

</script>

 

.to an external javascript file like:

function myFunction(){

    if ($myParam='x'){

      alert('x')

    }
}

 

Thanks for any help on the issue.

 

Linc


Mime
View raw message