summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
Diffstat (limited to 'swat')
-rw-r--r--swat/scripting/client/js_scripts.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/swat/scripting/client/js_scripts.js b/swat/scripting/client/js_scripts.js
index 776e5e4ded..1c6e5806f4 100644
--- a/swat/scripting/client/js_scripts.js
+++ b/swat/scripting/client/js_scripts.js
@@ -32,10 +32,17 @@ function __get_js_script(file)
function __add_js_script(path)
{
+ // Create a unique ID for this script
+ var srcID = new Date().getTime();
+
var script = document.createElement('script');
- script.setAttribute('type', 'text/javascript');
- script.setAttribute('src', path);
+ script.type = 'text/javascript';
+ script.id = srcID;
+
head.appendChild(script);
+
+ // IE works only with the path set after appending to the document
+ document.getElementById(srcID).src = path;
}
function __remove_js_script(path)