IE 7 & 8 wont load script
<p>I am using the following code to load in needed JS libraries for my widget:</p>

<pre><code>function loadScrip(url, callback) {
    var script = document.createElement("script")
    script.type = "text/javascript";

    if (script.readyState) { //IE
        script.onreadystatechange = function () {
            if (script.readyState == "loaded" || script.readyState == "complete") {
                script.onreadystatechange = null;
                callback();
            }
        };
    } else { //Others
        script.onload = function () {
            callback();
        };
    }
    script.src = url;
    document.getElementsByTagName("head")[0].appendChild(script);
}


loadScrip("http://code.jquery.com/jquery-1.8.3.js", function () {
    loadScrip("http://code.jquery.com/ui/1.9.2/jquery-ui.js", function () {
        alert("Loaded");
        js13 = jQuery.noConflict(true);
        main();
    });
});
</code></pre>

<p>This works absolutley fine in all browsers and in IE9.</p>

<p>But in IE 7 &amp; 8 for some reason the jquery-ui.js wont load and i get error:</p>

<pre><code>Line: 563
Character: 4
Code: 0
Error Message: Object doesn't support this property or method
URL: http://code.jquery.com/jquery-1.8.3.js
</code></pre>

<p>Any ideas how to fix this? Im banging my head against the wall with this problem </p>
