summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/js/prado.js
diff options
context:
space:
mode:
authorwei <>2006-05-05 03:21:33 +0000
committerwei <>2006-05-05 03:21:33 +0000
commitbeeb00efbeb2ea5925285c68e4f9a9f680b0ffdc (patch)
treef2f1b7a640d7b4a49cec389ea1ac84b0b638e788 /framework/Web/Javascripts/js/prado.js
parent05b69a565ebf001f42fdb6558f204bf3f1a9b61a (diff)
Fixed #156.
Diffstat (limited to 'framework/Web/Javascripts/js/prado.js')
-rw-r--r--framework/Web/Javascripts/js/prado.js7
1 files changed, 2 insertions, 5 deletions
diff --git a/framework/Web/Javascripts/js/prado.js b/framework/Web/Javascripts/js/prado.js
index 498a6cf7..56364428 100644
--- a/framework/Web/Javascripts/js/prado.js
+++ b/framework/Web/Javascripts/js/prado.js
@@ -253,11 +253,8 @@ Prado.Element={setValue:function(element,value)
el.value=value;},select:function(element,method,value)
{var el=$(element);var isList=element.indexOf('[]')>-1;if(!el&&!isList)return;method=isList?'check'+method:el.tagName.toLowerCase()+method;var selection=Prado.Element.Selection;if(isFunction(selection[method]))
selection[method](isList?element:el,value);},click:function(element)
-{var el=$(element);if(!el)return;if(document.createEvent)
-{var evt=document.createEvent('HTMLEvents');evt.initEvent('click',true,true);el.dispatchEvent(evt);}
-else if(el.fireEvent)
-{el.fireEvent('onclick');if(typeof(el.onclick)=="function")
-el.onclick();}},setAttribute:function(element,attribute,value)
+{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.setAttribute(attribute,value);},setOptions:function(element,options)