[Typo3-dev] Error including JS in headerData

Michael Scharkow mscharkow at gmx.net
Sat Apr 30 20:46:07 CEST 2005


Hi,

I need to dynamically place JS code in the page header within a fe 
plugin, like this

$GLOBALS['TSFE']->pSetup['headerData.'][$levelHeaderData.'.']['value'] = 
$jsCode;

The problem is that $jsCode contains a line like
for(var i=0; i<document.bla...

and the less-than sign seems to break the rendering of the page header 
because the following code is rendered like this

ifdocumenttx_mssurvey_pi1_surveyformtx_mssurvey_pi1colorichecked="true){" 
errormessagepop="" break="" iferrormessagelength="0)"


I tried using &lt; but this is rendered verbatim, so I'm completely at 
loss.

Hints, workarounds (like on how to write a for loop without < or >) are 
appreciated. BTW, I'm using the latest beta...

Greetings,
Michael




More information about the TYPO3-dev mailing list