[TYPO3] html with javascript as a content element

Jörg Verstraete jorg.no.verstraete at telin.spam.ugent.be
Fri Dec 30 12:54:52 CET 2005


Great, thanks, everything works now!

I do have another question now: in that Javascript I have the error 
messages for when a required field for instance isn't fill in.

However, the site is a multilanguage site (one three concept). What 
would be the best/easiest way to make these errormessages appear in the 
correct language? All language versions of the same page have the same 
id number, but are differentiated using a global variable L.

Do I just duplicate the section for page id=3 and language L=1, L=2, L=3?
[globalVar = TSFE:id = 3]

[globalVar = TSFE:id = 3 & GP:L=1]
... // for language 1
(I'm not sure if this is the best way, nor if it is the correct syntax).



Tyler Kraft wrote:
> sorry my mistake
> try this
> [globalVar = TSFE:id = 3]
> page.headerData.10 = TEXT
> page.headerData.10.value(
>     <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
>     // all the javascript code
>     </SCRIPT>
> )
> [END]
> But you could have found all this in TSref.  I know it can be very 
> frustrating and annoying, but you just need to read and reread all the 
> docs numerous times. It will come together.
> But the first point of checking should have been to see if it was going 
> into the html output from typo3, as that would have told you that the 
> problem was still in the template and not the html/javascript.
> hope thats a bit more helpful ;-)

More information about the TYPO3-english mailing list