Hi all, I have this code to work with,
Code:
 var head = $j('head').get(0);

      var script = document.createElement('script');
		script.src = _tokenScriptSrc+'&num='+_cnt++;  // Add uniqueness to the script so we don't get a cached version
		script.type = 'text/javascript';
		script.id=kTokenScriptID;
	   head.appendChild(script);
/*
So this becomes,
<script type="text/javascript" src="http://mydomain.com?id=5&num=5"></script>
And becomes the last element in the head.
*/
This is within a function and is called when a form is submitted.
My question is how does "script.id" work into this and where would it go? Am I misunderstanding this?
BTW the script id is defined as var kTokenScriptID = 'TKN'; but why is it needed?

Thanks in advance,
Loren.