[TYPO3-english] javascript

Jim MacFarlane jmacfarlane094 at gmail.com
Sat Oct 5 15:46:33 CEST 2013


I assume the inline code can look like this. This code does not appear in
the source for the page. I am running typo3 version 4.7.10 and templavoila.

page.jsInline {
  10=TEXT
  10.value
  (
  <script>
  var c="content" ;
  var l="left_sidebar";
  var r="right_sidebar";
</script>

<script>
function elementHeight(ele) {
var ele;
var x ;
x=window.innerHeight;
x = x-15;
document.getElementById(ele).height=x;
}
</script>
  )
}
Hello Jim,

On 04/10/2013 14:26, Jim MacFarlane wrote:
> How do you use typoscript to embed a javascript function into the page
> headers?

You got several ways, all through your main PAGE [1] cObject.
The easiest being:
--
page.jsInline {
  10 = TEXT
  10.value (
/*
Some inline js code
several lines long.
*/
  )
}
--

Although you will need to look whether or not your sites PAGE cObject is
called 'page'. Properties are also explained in the reference [1].


Kind regards
Stefan

[1] http://docs.typo3.org/typo3cms/TyposcriptReference/Setup/Page/Index.html
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english


More information about the TYPO3-english mailing list