diff options
author | ctrlaltca <> | 2012-06-01 09:25:29 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-06-01 09:25:29 +0000 |
commit | f337ba2bebcbe8f4a8493a482526131e6207bb6d (patch) | |
tree | 994c802c7dbfc7d770f8f095112b886e7d937984 /framework/Web/Javascripts | |
parent | 579d16245fd64ded09792b33e9411ed9832bac27 (diff) |
TActiveClientScript: remove scripts from the page after the browser evaluated them
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r-- | framework/Web/Javascripts/source/prado/scriptaculous-adapter.js | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js index 740f9607..2cdc34e6 100644 --- a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js +++ b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js @@ -423,16 +423,14 @@ Prado.Element = var content = Prado.Element.extractContent(this.transport.responseText, boundary);
if(content == null)
return;
- var id = 'inline_' + boundary;
-
- if($(id))
- document.body.removeChild($(id));
var el = document.createElement("script");
el.type = "text/javascript";
- el.id = id;
+ el.id = 'inline_' + boundary;
el.text = content;
- document.body.appendChild(el);
+
+ (document.getElementsByTagName('head')[0] || document.documentElement).appendChild(el);
+ el.parentNode.removeChild(el);
},
/**
|