[TYPO3-core] RFC: 0002901: API needed to write HTML tags into the FE header tags directly

Franz Holzinger franz at fholzinger.com
Fri Mar 17 15:50:52 CET 2006


Hello Dmitry,

>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi!
>
>Franz Holzinger wrote:
>  
>
>>Description: A FE method is needed to write HTML code directly inside
>>of the <head> tags. This is needed for AJAX.
>>
>>
>>Problem: It is already possible to put JavaScript code into the HTML
>>header of a page. However if you want to use AJAX then the AJAX
>>engine itself produces all JavaScript code for you. This includes
>>already the <script> tags with additional attributes. E.g. the XAJAX
>>extension from Elmar Hinz produces the line ----------- <script
>>type="text/javascript"
>>src="typo3/ext/xajax/xajax_js/xajax.js"></script> -------------- in
>>order to include JavaScript code from inside of a file.
>>
>>At the moment JavaScript from XAJAX can only be used inside of a DIV
>>tag. It would however be better not to have the same code in every
>>DIV tag which needs AJAX.
>>
>>The attached file has been produced with the latest development
>>version of tt_products with the categories list display using select
>>boxes and JavaScript to fill the second and third select box on the
>>change of the select box before. At the end the article of the
>>selected category should be shown using AJAX.
>>    
>>
>
>- -1 because $GLOBALS['TSFE']->additionalHeaderData[] exists for this. If
>I am wrong or you cannot use it, explain why, please.
>  
>
I am  trying to use it of course:

        $this->JSCode = $this->additionalHeaderData['JSCode'];
        $this->headerHTML = $this->additionalHeaderData['headerHTML'];
        $this->JSImgCode = $this->additionalHeaderData['JSImgCode'];

This line is new:

>         $this->headerHTML = $this->additionalHeaderData['headerHTML'];

However otherwise there is no possibility to use the HTML directly. And
additionally the HTML code shall be generated by AJAX by a call from
inside of an extension.


- Franz











More information about the TYPO3-team-core mailing list