diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TClientScript.php')
-rw-r--r-- | framework/Web/UI/WebControls/TClientScript.php | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/framework/Web/UI/WebControls/TClientScript.php b/framework/Web/UI/WebControls/TClientScript.php index 325105bc..4736df0e 100644 --- a/framework/Web/UI/WebControls/TClientScript.php +++ b/framework/Web/UI/WebControls/TClientScript.php @@ -132,9 +132,16 @@ class TClientScript extends TControl {
if($this->getHasControls())
{
- $writer->write("<script type=\"text/javascript\">\n/*<![CDATA[*/\n");
- $this->renderChildren($writer);
- $writer->write("\n/*]]>*/\n</script>\n");
+ if($this->getPage()->getIsCallback())
+ {
+ $extWriter= $this->getPage()->getResponse()->createHtmlWriter();
+ $this->renderChildren($extWriter);
+ $this->getPage()->getCallbackClient()->appendScriptBlock($extWriter);
+ } else {
+ $writer->write("<script type=\"text/javascript\">\n/*<![CDATA[*/\n");
+ $this->renderChildren($writer);
+ $writer->write("\n/*]]>*/\n</script>\n");
+ }
}
}
}
|