summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorwei <>2006-06-22 11:55:46 +0000
committerwei <>2006-06-22 11:55:46 +0000
commit817da66e1cb3548f728db9ff4a96e783ed7522b5 (patch)
tree6a994ae26d05054a9becaa82d8839cc778c56113 /framework/Web/Javascripts
parent99ea5b7b4b90d0298f47223c0fc832b30c1903eb (diff)
Update callback adapter
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/js/prado.js3
-rw-r--r--framework/Web/Javascripts/prado/element.js2
2 files changed, 4 insertions, 1 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index f77fe0f2..c2f2fdfd 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -257,7 +257,8 @@ selection[method](isList?element:el,value);},click:function(element)
{var el=$(element);if(el)
Event.fireEvent(el,'click');},setAttribute:function(element,attribute,value)
{var el=$(element);if(attribute=="disabled"&&value==false)
-el.removeAttribute(attribute);else
+el.removeAttribute(attribute);else if(attribute.match(/^on/i))
+el[attribute]=eval("(function(event){"+value+"})");else
el.setAttribute(attribute,value);},setOptions:function(element,options)
{var el=$(element);if(el&&el.tagName.toLowerCase()=="select")
{while(el.length>0)
diff --git a/framework/Web/Javascripts/prado/element.js b/framework/Web/Javascripts/prado/element.js
index 59a8ea1e..9d0179dc 100644
--- a/framework/Web/Javascripts/prado/element.js
+++ b/framework/Web/Javascripts/prado/element.js
@@ -35,6 +35,8 @@ Prado.Element =
var el = $(element);
if(attribute == "disabled" && value==false)
el.removeAttribute(attribute);
+ else if(attribute.match(/^on/i)) //event methods
+ el[attribute] = eval("(function(event){"+value+"})");
else
el.setAttribute(attribute, value);
},