summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorctrlaltca <>2012-06-01 09:25:29 +0000
committerctrlaltca <>2012-06-01 09:25:29 +0000
commitf337ba2bebcbe8f4a8493a482526131e6207bb6d (patch)
tree994c802c7dbfc7d770f8f095112b886e7d937984
parent579d16245fd64ded09792b33e9411ed9832bac27 (diff)
TActiveClientScript: remove scripts from the page after the browser evaluated them
-rw-r--r--framework/Web/Javascripts/source/prado/scriptaculous-adapter.js10
-rwxr-xr-xframework/Web/UI/ActiveControls/TActiveClientScript.php1
2 files changed, 4 insertions, 7 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);
},
/**
diff --git a/framework/Web/UI/ActiveControls/TActiveClientScript.php b/framework/Web/UI/ActiveControls/TActiveClientScript.php
index fba74f4c..d1ed5d3c 100755
--- a/framework/Web/UI/ActiveControls/TActiveClientScript.php
+++ b/framework/Web/UI/ActiveControls/TActiveClientScript.php
@@ -68,7 +68,6 @@ class TActiveClientScript extends TClientScript
if($this->getPage()->getIsCallback())
{
$extWriter= $this->getPage()->getResponse()->createHtmlWriter();
- $extWriter->getWriter()->setBoundary($this->ClientID);
$extWriter->write("/*<![CDATA[*/\n");
$this->renderChildren($extWriter);
$extWriter->write("\n/*]]>*/");