From d2f675e58b1c42c8960907ee20490a391aec0ecc Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 7 Dec 2005 03:31:08 +0000 Subject: --- framework/Web/UI/WebControls/TButton.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TButton.php') 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)) -- cgit v1.2.3