Translations
Info
All page names need to be in English.
en da  de  fr  it  ja  km  nl  ru  zh

ExtensionCodeSamples

From TYPO3Wiki
Jump to: navigation, search

<< Back to Main Page

[edit]

<< Back Overview Developer Manuals

Programmatically change body tags

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();>";