[TYPO3] Noobie - Javascript Including, Setup Screens

Rens Admiraal typo3 at ambitiondesign.nl
Tue Jun 19 15:39:47 CEST 2007


Hi Sancar,

That's a cleaner way, and I'm sure I've seen the answer to this  
question in a post on this list. I just can't find it anymore.



Op 19-jun-2007, om 15:28 heeft Sancar Saran het volgende geschreven:

> On Tuesday 19 June 2007 15:48:12 Rens Admiraal wrote:
>> Hi Sancar,
> Hi Rens
>> I'm relatively new to Typo also, but I can give you an answer for
>> your second question :-)
>>
>> You can add javascript code to the header using the $GLOBALS['TSFE']-
>>
>>> additinalHeaderData array:
>>
>> $GLOBALS['TSFE']->additionalHeaderData[] = file_get_contents
>> (t3lib_extMgm::extPath($this->extKey, 'pi1/script.js'));
>>
>> (this reads the content from the file pi1/script.js in the frontend
>> extension dir, and puts it in the header. Don't forget to add the
>> <script> tags in this js file
>>
>>
>> Greetz,
>> Rens
>>
>
> I add this into script.
> 		$GLOBALS['TSFE']->additionalHeaderData[] = file_get_contents
> (t3lib_extMgm::extPath($this->extKey, 'evoBase.js'));
> 		$GLOBALS['TSFE']->additionalHeaderData[] = file_get_contents
> (t3lib_extMgm::extPath($this->extKey, 'cal2.js'));
>
> And system includes js files int head.
>
> Probably I made mistake when I was try to describe problem.
>
> I want to give refeence this javascript files in page <head></head>  
> like this
>
> <head>
> <title>Yabadaba dooo</title>
> <the other meta tag mumbo jumbo />
> <script type="text/javascript"
> src="whateverDirecotoryname/evoBase.js"></script>
> <script type="text/javascript" src="whateverDirecotoryname/ 
> cal2.js"></script>
> </head>
>
> What is my mistake.
>
> Lots of thanks
>
> Sancar
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english



More information about the TYPO3-english mailing list