[TYPO3-dev] What is the best way to add custom JS events on TCA fields in BE?
Xavier Perseguers
xavier at typo3.org
Mon Aug 22 12:03:27 CEST 2011
Hi,
> You could identify the input field by it´s name (the id seems to change on every reload).
>
> $('input["name"="data[tx_extname][6][namenszusatz]_hr"]').click(function() {
> alert("hello world");
> });
This basically is the way to go. You may have a look at some real-world
sample I did to add a Google Map to TCA and automatically refresh it
when clicking on the corresponding TCA tab (due to some overlays being
loaded with an invalid z-index when the Google Map is not shown when
loading the edit form:
http://xavier.perseguers.ch/fileadmin/download/typo3/tx_climbingsites_tca_map.txt
Corresponding article:
http://xavier.perseguers.ch/tutoriels/typo3/articles/google-map-in-tca.html
HTH
--
Xavier Perseguers
Release Manager TYPO3 4.6
TYPO3 .... inspiring people to share!
Get involved: http://typo3.org
More information about the TYPO3-dev
mailing list