diff options
Diffstat (limited to 'framework/Web/Javascripts/prado/element.js')
-rw-r--r-- | framework/Web/Javascripts/prado/element.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/prado/element.js b/framework/Web/Javascripts/prado/element.js index 06937253..88fb9ec5 100644 --- a/framework/Web/Javascripts/prado/element.js +++ b/framework/Web/Javascripts/prado/element.js @@ -74,6 +74,18 @@ Prado.Element = if(typeof(obj) != "undefined" && typeof(obj.focus) != "undefined")
setTimeout(function(){ obj.focus(); }, 100);
return false;
+ },
+
+ replaceContent : function(element, method, content, boundary, transport)
+ {
+ if(boundary)
+ {
+ var f = RegExp('(<!--'+boundary+'-->)([\\s\\S\\w\\W]*)(<!--//'+boundary+'-->)',"m");
+ var result = transport.responseText.match(f);
+ if(result && result.length >= 2)
+ content = result[2];
+ }
+ method.toFunction().apply(this,[element,content]);
}
}
|