I'm ashamed
to ask such a stupid question:
I know how to do it the classic way:
Just a simple example... (just invented it, the real thing is much more complex)
normally I would include this in <head>
and my.js having as content
if I want to do it the xenforo way i would :
have:
<xen:require js="my.js" />
this moves the js file call to head..
but how do i get the:
<script type="text/javascript">
var amount = '{$amount}';
</script>
into head?????? I looked for a container or something...

I know how to do it the classic way:
Just a simple example... (just invented it, the real thing is much more complex)
normally I would include this in <head>
HTML:
<script type="text/javascript">
var amount = '{$amount}';
</script>
<script type="text/javascript" src="my.js"></script>
and my.js having as content
Code:
function count(factor) {
var newamount = amount*factor;
return newamount;
}
have:
<xen:require js="my.js" />
this moves the js file call to head..
but how do i get the:
<script type="text/javascript">
var amount = '{$amount}';
</script>
into head?????? I looked for a container or something...