[TYPO3-english] Include JavaScript

Iban Cardona i Subiela icardona at serialnet.net
Tue Mar 13 16:07:01 CET 2012


Hello,

I used to use this code in my fe-plugins:

var $extKey   = 'user_t3xxx';    // The extension key.
$GLOBALS['TSFE']->additionalHeaderData[$this->extKey] = '<script
src="src_of_the_js"></script>';

On 03/13/2012 03:31 PM, Theo Kotey wrote:
> Hiiiiiiiii :)
>
> Thanks a lot for your help.
>
>
> On 3/13/2012 12:31 PM, Kay Strobach wrote:
>> Hi,
>>
>> In An Extenion you may call the pagerenderer and add a script file
>> ($this->doc->getPageRenderer() in pibase class).
>>
>> http://api.typo3.org/typo3v4/45/html/classt3lib___page_renderer.html
>>
>> in pure ts use the following snippet:
>>
>> http://blog.chandanweb.com/typo3/how-to-include-multiple-css-and-js-files-using-typoscript
>>
>>
>>
>> PS: it's common to say "hi" or "hello" in the beginning of a  question
>> in this list ;)
>>
>> Regards
>> Kay
>>
>> Am 13.03.2012 10:31, schrieb Theo Kotey:
>>> I have include some JavaScript files in my templates but they do not
>>> work when I run the website and test the forms. How do you include JS
>>> files in Typo3 so that they work properly.
>>>
>>> Thanks
>>> Theo
>>
>>
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english
>

-- 

  **




More information about the TYPO3-english mailing list