So I have the following it works perfectly fine in most browsers except in IE8 and older it will only run when you first visit page or when you ctrl + f5(clear cache) and view the page. What is happening is the item this affects is in my master layout/template for the page so when I traverse through the site it doesn't load.
For instance I am on home page, I click into personal section expect the item to load on the next page but it doesn't even appear.
$(document).ready(function () {
if (window.document.domain == "developer10.machine") {
var oScript = document.createElement('script');
oScript.type = 'text/javascript';
oScript.src = '/js/uk_converter.js';
// most browsers
oScript.onload = function () {
renderCurrencyConverter('GBP', 'EUR', 1.00);
}
// IE
oScript.onreadystatechange = function () {
if (this.readyState == 'loaded' && ($.browser.msie && parseInt($.browser.version, 10)))
{
renderCurrencyConverter('GBP', 'EUR', 1.00);
}
}
document.body.appendChild(oScript);
}
});