diff options
Diffstat (limited to 'framework/Web/UI/WebControls/TButton.php')
-rw-r--r-- | framework/Web/UI/WebControls/TButton.php | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/framework/Web/UI/WebControls/TButton.php b/framework/Web/UI/WebControls/TButton.php index a9eac8ac..e7c40a75 100644 --- a/framework/Web/UI/WebControls/TButton.php +++ b/framework/Web/UI/WebControls/TButton.php @@ -81,8 +81,7 @@ class TButton extends TWebControl implements IPostBackEventHandler if($this->getEnabled(true))
{
- $onclick='';
- $onclick=$this->hasAttribute('onclick')?$this->getAttributes()->remove('onclick'):'';
+ $onclick=$this->removeAttribute('onclick');
$onclick=THttpUtility::trimJavaScriptString($onclick).THttpUtility::trimJavaScriptString($this->getOnClientClick());
$onclick.=$page->getClientScript()->getPostBackEventReference($this,'',$this->getPostBackOptions(),false);
if(!empty($onclick))
|