[Typo3] How to add javascript to select box (backend)?

Oliver Schröder typo3 at schroederbros.de
Thu Sep 8 13:16:43 CEST 2005


Dmitry Dulepov schrieb:

> Not enough information. 

>>my extension uses a select box in the backend.
>>How can I add code to the javascript onchange part?


Hi Dmitry,

the extension was generated by the kickstarter.


In the backend Typo3 generates this code for the select box:

<select name="data[tt_content][115][tx_ddcontent_type]" size="1" 
onchange="if (this.options[this.selectedIndex].value=='--div--') 
{this.selectedIndex=3;} 
TBE_EDITOR_fieldChanged('tt_content','115','tx_ddcontent_type','data[tt_content][115][tx_ddcontent_type]');"><option 
value="0">Leer</option><option value="1">Bild</option><option 
value="2">Text</option>...</select>


Is there any way to add code to the onchange-part without changing code 
in class.t3lib_tceforms.php?

Is there an easier way than to add a user type like 
$TCA['tt_content']['columns'][tx_ddcontent_type]['config']['type'] = 
'user' ...?

Thanks so far,
Oliver



More information about the TYPO3-english mailing list