You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "smart_runner23 <morr0209@tc.umn.edu>" <mo...@tc.umn.edu> on 2003/01/20 22:55:27 UTC

How to use Tiles or templates with CSS and Javascript

Where do you add your Javascript when using Tiles?  You are not 
supposed to put content into the template file.  

Say you have the standard template:

<html:html>
<head>
  <title>blah</title>
</head>
<body>

<tiles:insert attribute="header"/>
<tiles:insert attribute="body"/>
<tiles:insert attribute="footer"/>
</body>
</html>


My javascript needs to be called with <body onload=start()>.  Where 
do you put the Javascript and this start() function call?  The 
javascript is needed in the header section, but you cannot put it in 
the header section as the body and head tags have already been 
defined.  Is my only choice to put the javascript and start() call in 
the template file itself?  If that is the case, Tiles is not 
accomplishing anything for me.  Same question about where to put a 
link to an external stylesheet.  

Or am I just missing something obvious?


Thanks.  
Trevor


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