[Typo3-dev] Eval of TCA field with JavaScript

Franz Holzinger franz at fholzinger.com
Thu Mar 31 18:08:42 CEST 2005


> It doesn't work at all. I found no way to insert my own JavaScripts and 
> so I have to do it with a hook now. (Hope this works...)
> 
> 
> I'm still happy for any tips and hints about this issue. :)
> 
In your main module class
/**
  * Main function of the module. Write the content to $this->content
  */
function main()	{
...
// JavaScript
$this->doc->JScode = '
	<script language="javascript" type="text/javascript">
		script_ended = 0;
		function jumpToUrl(URL)	{
		document.location = URL;
		}
	</script>
	';
the JavaScript code gets inserted.
You can write more functions there.


Franz




More information about the TYPO3-dev mailing list