ExtensionCodeSamples
From TYPO3Wiki
<< Back to Main Page
<< Back Overview Developer Manuals
[edit]
Programmatically change body tags
[edit]
Add javascript
When you need to add onload event javascript to a bodyTag, from within your extension, use:
$GLOBALS["TSFE"]->JSeventFuncCalls["onload"][$this->prefixId]="<yourJavascriptInitCall();>";
The same method applies to onunload. Then replace "onload" by "onunload".
$GLOBALS["TSFE"]->JSeventFuncCalls["onunload"][$this->prefixId]="<yourJavascriptUnLoadCall();>";
