[TYPO3-dev] Positioning JavaScript from a FE plugin

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Sat Nov 24 16:46:23 CET 2007


Francois Suter schrieb:
> Hi all,
> 
> In a FE plugin I need to position JavaScript at precise places in the 
> HTML code, i.e. right after the opening body tag and right before the 
> closing body tag.
> 
> Right now I'm simply relying on the PAGE object using
> 
> page.1 = USER
> page.1 ...

You could also use the body-tag object (see TSref) for that. But this is 
something for the site admin to do.

> This is all fine as long as it's just me using this extension in my 
> sites, but it's bit of a hassle otherwise.

Adding TS code like that isn't any good anyway. How can you know that my 
PAGE object is called "page"?

> Is there any way to place that JavaScript from within the plugin's class 
> precisely at the right points?

No. And it wouldn't be any good as there could be two extension which 
think "right after <body> is the only place for my code".

Masi




More information about the TYPO3-dev mailing list