[Seaside] Script in head tag

Sebastian Sastre ssastre at seaswork.com
Thu Oct 23 09:30:19 UTC 2008

> > a file of a javascript library, how do I add a script with 
> actual javascript
> > code there?
> aHtmlRoot addScript: 'abc'
Yup, that made it.

> > PD: not good idea for regular code but a good one for 
> initialization code like
> > the one provided by google with:
> > google.load('prototype','1.6')
> > google.load('scriptaculous','1.8')
> > (see: http://code.google.com/apis/ajaxlibs)
> I would directly embed the URLs of the particular libraries. That's
> much more efficient than having  Javascript being started to fetch the
> files.
> Lukas
That’s what I was doing so far. Using google.load has the advantage of getting
the libraries with no requests when other site was visited by the user and has
requested those already (which will occur if that site also used google.load and
the very same version of the libraries of your app of course). You can bet that
is efficient.

Cheers, and thanks again,

PD: I've observed in #writeHeadOn: a grouped write (element, scripts and
stylesheets) which breaks order of what you ask root to render. I'm reviewing it
because strict order is crucial for using this.

More information about the seaside mailing list