You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by jill han <jh...@bynum.com> on 2006/01/13 19:19:30 UTC

loading a javascript file

We have a turbine/torque/velocity application deployed to Tomcat which
is in Apache container(AJP13)
Here is a snippet from a velocity page.

<script langauge="javascript"
src="$content.getURI("javascript/calendar.js")"></script>

However, when the page is accessed, the calendar is not displayed
properly since the calendar.js is not loaded. You have to hit 'refresh'
button on the browser.

If the page was deployed to the solely Tomcat, it will be displayed
correctly.
Why is that?
Your help is appreciated as always.
Jill



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


Re: loading a javascript file

Posted by Jean-François Chamard <jf...@interstructure.ca>.
Hi Jill,
not really a velocity related question... but you should check the 
output source first

in the text you type, it's supposed to be "language" and not "langauge"
Although, this syntax is deprecated, it doesn't matter much but you 
should use this syntax <script src="" type="text/javascript>

Hope it helps a bit
Jeff

jill han wrote:

>We have a turbine/torque/velocity application deployed to Tomcat which
>is in Apache container(AJP13)
>Here is a snippet from a velocity page.
>
><script langauge="javascript"
>src="$content.getURI("javascript/calendar.js")"></script>
>
>However, when the page is accessed, the calendar is not displayed
>properly since the calendar.js is not loaded. You have to hit 'refresh'
>button on the browser.
>
>If the page was deployed to the solely Tomcat, it will be displayed
>correctly.
>Why is that?
>Your help is appreciated as always.
>Jill
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>  
>

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


RE: loading a javascript file

Posted by Edward Song <es...@royalmedia.com>.
Its a client side issue. 
Try 
<script type="text/javascript"
src="$content.getURI("javascript/calendar.js")"/>

Edward Song
 

-----Original Message-----
From: jill han [mailto:jhan@bynum.com] 
Sent: Friday, January 13, 2006 1:20 PM
To: Velocity Users List
Subject: loading a javascript file 


We have a turbine/torque/velocity application deployed to Tomcat which is in
Apache container(AJP13) Here is a snippet from a velocity page.

<script langauge="javascript"
src="$content.getURI("javascript/calendar.js")"></script>

However, when the page is accessed, the calendar is not displayed properly
since the calendar.js is not loaded. You have to hit 'refresh'
button on the browser.

If the page was deployed to the solely Tomcat, it will be displayed
correctly.
Why is that?
Your help is appreciated as always.
Jill



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


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