1
0
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:
Deryck Hodge 2005-08-26 21:58:57 +00:00 committed by Gerald (Jerry) Carter
parent 25c3942623
commit bcc288d880

View File

@ -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)