put external javascript file in document head

put external javascript file in document head

  
Hi,
I have a webblock with javascript in it. I use this webblock in many different espaces. This javascript uses classes from an external javascript library. So when i use this webblock in a new espace I need to reference this external library. I would like to reference the library in the head of the document - something like <script src="externallibrary.js"so that the classes are recognized in the webblock. Additionally i would also like to put some variables in it thru a site variable for example, something like <script src="externallibrary.js&key=" + site.key.

Can someone suggest a way to do it?

thanks.

use this component http://www.outsystems.com/NetworkSolutions/ProjectDetail.aspx?ProjectId=63
and perhaps alter it a bit if not suited completely
Thanks Joost for your quick reply. I will definetly give a try.