From 098556f20a2014f8ca211b0820cfa4776052641b Mon Sep 17 00:00:00 2001 From: ctrlaltca <> Date: Fri, 18 May 2012 18:00:24 +0000 Subject: fix #401 --- .../source/prado/scriptaculous-adapter.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'framework/Web/Javascripts') diff --git a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js index 23b49f56..740f9607 100644 --- a/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js +++ b/framework/Web/Javascripts/source/prado/scriptaculous-adapter.js @@ -413,6 +413,28 @@ Prado.Element = } }, + /** + * Appends a javascript block to the document. + * @function ? + * @param {string} boundary - Boundary containing the javascript code + */ + appendScriptBlock : function(boundary) + { + 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.text = content; + document.body.appendChild(el); + }, + /** * Extract content from a text by its boundary id. * Boundaries have this form: -- cgit v1.2.3