cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <robby.pelss...@ciber.com>
Subject how-to reference external js from cocoon 2.2 block
Date Thu, 04 Jun 2009 08:19:59 GMT
Hi all,

 

I'm a bit puzzled about how to reference an external javascript file.

 

Let's say I've put it in

 

src/main/resources/external/js/test.js 

 

I thought about referencing it the same way as my css file but somehow
this does not work.  Can someone explain how I can accomplish this?  Now
adding the <script> line in my xslt gives me an empty html page.

 

Thx in advance,

Robby

 

  <xsl:template match="/">

      <html>

        <head>

          <meta http-equiv="Content-Type"
content="text/html;charset=UTF-8" />

          <title>My Cocoon block</title>

          <link type="text/css" rel="stylesheet"
href="resource/external/css/styles.css"></link>

          <script type="text/javascript"
src="resource/external/js/test.js"></script>

        ...

 </xsl:template>      

 

 


Mime
View raw message