You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Darin Wilcox <Da...@nurs.utah.edu> on 2002/02/26 19:26:52 UTC

JavaScript after

All,

I am using the 2.1 tdk.  Our designer has implemented a .js file that should be called after the </html>.  Is there a way for this tag (

<script language="JavaScript" src="jsfile.js"></script>

) to be attached after the templates have been assembled so that the final look is like this:

</html>
<script language="JavaScript' src="jsfile.js"></script>


Thanks,

- Darin

-------------------------------------------------------------
Darin Wilcox
Web Engineer
College of Nursing
University of Utah
585-7332


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JavaScript after

Posted by Pete Kazmier <pe...@kazmier.com>.
On Tue, Feb 26, 2002 at 11:26:52AM -0700, Darin Wilcox wrote:
> to be attached after the templates have been assembled so that the
> final look is like this:
> 
> </html> <script language="JavaScript' src="jsfile.js"></script>

I'm not sure if this applies to you or not, but if you want to add
"stuff" after the closing HTML tag, make sure you aren't using
VelocityECSLayout in your TurbineResouces.properites.  You'll want to
change it to VelocityOnlyLayout, in which case, you'll be responsible
for creating the entire page including the <html> tags and anything else
you want.

In summary, change this line:

services.VelocityService.default.layout = VelocityECSLayout

to this:

services.VelocityService.default.layout = VelocityOnlyLayout

Hope that helps,
pete

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: JavaScript after

Posted by Stéphane MOR <st...@yahoo.fr>.
Hi Darin,

You can link to your file like this :
1) place your "jsfile.js" file in a directory like :
${TOMCAT_HOME}
    ---- webapps
        ---- ${mywonderfulapp}
            ---- resources
               ---- js
                     jsfile.js

2) Then, in your Layout, or in your Template, refer using
$content.getURI("your.path"), as :
<script language="JavaScript"
src="$content.getURI("resources/js/jsfile.js")"/>

This is used to access files using their relative path.
You can use this for images, css, etc.

To use it in all your templates, I'd suggest you place this line in your
Layout rather
than in your template. This would look like :

<html>
<script language="JavaScript"
src="$content.getURI("resources/js/jsfile.fs")"/>
<body>
$screen_placeholder #* This is where your template goes *#
</body>
</html>

Stephane

----- Original Message -----
From: "Darin Wilcox"


All,

I am using the 2.1 tdk.  Our designer has implemented a .js file that should
be called after the </html>.  Is there a way for this tag (

<script language="JavaScript" src="jsfile.js"></script>

) to be attached after the templates have been assembled so that the final
look is like this:

</html>
<script language="JavaScript' src="jsfile.js"></script>


Thanks,

- Darin



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>