forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <sju...@mac.com>
Subject javascript in dispatcher theme
Date Fri, 26 Jan 2007 16:59:23 GMT
Hello again,

A completely unrelated question:

How to I include a reference to a javascript in a dispatcher theme? I  
have a file-specific theme based on pelt.fv in which I want to output  
a script element in the resulting html file, containing a reference  
to a javascript file.

I couldn't find a proper contract for the job, so I took a shortcut,  
by just adding it to what seemed like another, similar construct:

...
     <forrest:contract name="siteinfo-meta" dataURI="lm:// 
project.build-info">
       <forrest:property name="custom">
          <meta http-equiv="content-type" content="text/html;  
charset=UTF-8"/>
          <script language="javascript" src="themes/risten.js"  
type="text/javascript"/> <== this line
       </forrest:property>
       <forrest:property name="theme" value="pelt"/>
     </forrest:contract>
...

Now, this seemed to work perfect, at least by first glance (ie in  
Safari). But when I tested the result in Firefox, the whole page was  
completely screwed up:

- all the content within the div#header was gone, logos, tabs, search  
box and everything
- Firefox reported the same content to be part of the html/head  
element, which it was not

The same could be observed in IE 6, whereas Opera behaved as nicely  
as Safari.

Just to be sure, I would like to either get confirmation that the  
above should be ok, or instructions on how to include a script  
element in a proper way.

Thanks a lot for your attention,
Sjur


Mime
View raw message