[TYPO3-dev] add Javascript function
Peter Russ
peter.russ at 4many.net
Thu Feb 16 12:08:01 CET 2006
Stefan Geith schrieb:
> Thomas Mammitzsch schrieb:
>> Johnny Peck schrieb:
>>> Thomas,
>>> I know it resembles something like
>>> $GLOBALS['TSFE']->additionalHeaderData = '<script type="text/javascript"
>>> src="your/source/"></script>'; ...etc...
>>>
>>> also there is a function additionalJavaScript() im sure. Check out the
>>> API for those here -> http://typo3.org/fileadmin/typo3api-3.8.0/
>
> $GLOBALS['TSFE']->setJS('identifier',$JavaScriptText);
>
> But this seems to be buggy in 3.8/3.8.1:
> I got 'scrambled' JavaScript in my Source,
> if adding much JavaScript ...
>
> -
>
> Stefan
Do you use xhtml_cleaning? That MIGHT causes the problems. Instead of
including code directly to your page try to include external JS. Or find
other work around. There a some ways to make the code "xhtml_cleaning"
resistent.
Regs. Peter.
--
Fiat lux!
Docendo discimus.
_____________________________
4Many® Services
openBC: http://www.openbc.com/go/invuid/Peter_Russ
More information about the TYPO3-dev
mailing list