You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jim Mackraz <ji...@mackraz.com> on 2001/10/16 07:46:18 UTC

javascript in HEAD tag?

I'm just starting out w/ Turbine 2.1

I'm trying to templatize a file that has substantial JavaScript in the HEAD
element.

I had hoped to put that where the html/JavaScript guy could edit it (i.e.,
in a velocity template).
Per this message in the archive
(http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg01942.html)
I see I can put <script src="somefile.js"> tags into the head tag using ECS,
but that's done in code...

The page author has considerable additional routines defined between
<script> and </script>.
I don't want to force those into a src'd js file, nor do they go in the
screen class source.

Is there a better solution out there?
And does anybody know whether it's just "safe enough" to put this sort of
JavaScript into the start of the Layout template?
(i.e., within the BODY element)?

Thanks much,
  Jim Mackraz
  jim@mackraz.com


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: javascript in HEAD tag?

Posted by Sean Legassick <se...@informage.net>.
You could use VelocityOnlyLayout instead of VelocityECSLayout - that way 
the HEAD is part of your layout template.

Sean

In message <00...@BIT>, Jim Mackraz 
<ji...@mackraz.com> writes
>I'm just starting out w/ Turbine 2.1
>
>I'm trying to templatize a file that has substantial JavaScript in the HEAD
>element.
>
>I had hoped to put that where the html/JavaScript guy could edit it (i.e.,
>in a velocity template).
>Per this message in the archive
>(http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg01942.html)
>I see I can put <script src="somefile.js"> tags into the head tag using ECS,
>but that's done in code...
>
>The page author has considerable additional routines defined between
><script> and </script>.
>I don't want to force those into a src'd js file, nor do they go in the
>screen class source.
>
>Is there a better solution out there?
>And does anybody know whether it's just "safe enough" to put this sort of
>JavaScript into the start of the Layout template?
>(i.e., within the BODY element)?
>
>Thanks much,
>  Jim Mackraz
>  jim@mackraz.com
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
Sean Legassick
sean@informage.net
         ignorance is not bliss

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: javascript in HEAD tag?

Posted by Heiko Braun <he...@fork.de>.
script sources within the body tags dont make problems
at all. if you still encounter some, you should stick
to the VelocityOnlyLayout Sean mentioned.
Although you are missing some of the nice features
velocity offers if you do it that way.


 --
 heiko braun, fork unstable media
 http://www.unstablemedia.com


On Mon, 15 Oct 2001, Jim Mackraz wrote:

> I'm just starting out w/ Turbine 2.1
>
> I'm trying to templatize a file that has substantial JavaScript in the HEAD
> element.
>
> I had hoped to put that where the html/JavaScript guy could edit it (i.e.,
> in a velocity template).
> Per this message in the archive
> (http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg01942.html)
> I see I can put <script src="somefile.js"> tags into the head tag using ECS,
> but that's done in code...
>
> The page author has considerable additional routines defined between
> <script> and </script>.
> I don't want to force those into a src'd js file, nor do they go in the
> screen class source.
>
> Is there a better solution out there?
> And does anybody know whether it's just "safe enough" to put this sort of
> JavaScript into the start of the Layout template?
> (i.e., within the BODY element)?
>
> Thanks much,
>   Jim Mackraz
>   jim@mackraz.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org