[Typo3-dev] add bodytag-params through own ext

Ingo Schommer lists at chillu.com
Wed Jan 12 12:14:26 CET 2005


hi!

thanx for your quick replies. somehow the methods don't work out...

I inserted the following into my main()-method:
// add onload into body-tag:
$TSFE->bodyTagAdd = 'onload="init();"';
		
//add onload-function:
$GLOBALS["TSFE"]->JSeventFuncCalls["onload"]["txfhdmediamap"]="init();";

the bodytag shows up with <body bgcolor="FFFFFF">

troubleshooting that i've already done:
- didn't include a template-specific bodytag via templavoila
- didn't specify a page.bodyTag-Typoscript

I also took a glance at cc_vscroller, but it didn't help either. 
typo3-version is 3.7.0. is this feature documented somewhere?

greets
ingo

kay stenschke wrote:
> Hi Ingo,
> 
> Please try this:
> 
> // add function to be called by 'onLoad' into header:
> // (have $jsCode contain your javaScript-Code)
> $TSFE->additionalHeaderData ['your_extension_key']= $jsCode;
> 
> // add onload into body-tag:
> $TSFE->bodyTagAdd= 'onload="your_function();"';
> 
> //ad onload-function:
> $GLOBALS["TSFE"]->JSeventFuncCalls["onload"][$this->prefixId]="your_function();";
> 
> Regards,
> Kay
> 




More information about the TYPO3-dev mailing list