Line 1: var getheadTag = document.getElementsByTagName('head')[0];

Line 2: setjs = document.createElement('script');

Line 3: setjs.setAttribute('type', 'text/javascript');

Line 4: getheadTag.appendChild(setjs);

Line 5: setjs.text = x.responseText;

Most of function has been covered before and to avoid excessive repetition I just want to highlight the particular section we haven't covered as yet. You can look at the whole script in the examples 9 folder if you feel lost.

Line 1: The first thing we want to do is grab the head tag. We can do this by using