mirror of
https://github.com/samba-team/samba.git
synced 2025-03-08 04:58:40 +03:00
r9668: Cross-browser fix for IE, when adding scripts on the fly.
deryck (This used to be commit 1f4e65ce96ec8c4335bfabbe54989a8cb431d773)
This commit is contained in:
parent
25c3942623
commit
bcc288d880
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user