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/TImageButton.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'framework/Web/UI/WebControls/TImageButton.php') diff --git a/framework/Web/UI/WebControls/TImageButton.php b/framework/Web/UI/WebControls/TImageButton.php index 669e517e..33dfde75 100644 --- a/framework/Web/UI/WebControls/TImageButton.php +++ b/framework/Web/UI/WebControls/TImageButton.php @@ -96,8 +96,7 @@ class TImageButton extends TImage implements IPostBackDataHandler, IPostBackEven 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