You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Wynter <da...@btclick.com> on 2002/04/15 16:30:40 UTC

Finding path to resource

I have just moved my .vm templates to subdirectories of
webapps/myapp/modules/app/screens that represent the roles that use them. I
have implemented a much simpler version of what Scott Weaver presented in
his extended security model. The last hurdle to overcome is finding my
JavaScript resources. I have a file 'global.js' located in the
webapps/myapp/resources directory. In this global.js file is a function
called comparePwds. It is address from a tempalte as follows:
<input type="submit" name="eventSubmit_doCreate" value="Create"
onClick="comparePwds(this.form)"/>

It cannot find it now that the template has moved to
webapps/myapp/modules/app/screens/Admin.

I tried adding this to the top of the template and separately to the top of
the layout template.
<script language="JavaScript"
src="$content.getURI("resources/global.js")"/>
I ended up with blank screens in both cases but no error about not finding
the script. I found a reference to this is in the  arhive, but this had
<html> and <body> tags which my templates do not. I could not find anything
on where these tags are implicitly in the Velocity templates. I understand
that I need to put the above <script ... in between the <html> and <body>
tags but where do these occur?

thanks

David Wynter
roamware Ltd.
(+44) (0) 208 922 7539 B.
(+44) (0) 7879 605 706 M.
david@roamware.com


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